Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
5 / 5
CRAP
100.00% covered (success)
100.00%
6 / 6
Alberthorta\Bonobo\Report\Opens
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
5 / 5
5
100.00% covered (success)
100.00%
6 / 6
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 getOpensTotal
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getUniqueOpens
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getOpenRate
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getLastOpen
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
<?php
namespace Alberthorta\Bonobo\Report;
class Opens {
    protected $opens_data;
    /**
     * Opens constructor.
     * @param $opens_data
     */
    public function __construct($opens_data) {
        $this->opens_data = $opens_data;
    }
    /**
     * @return int
     */
    public function getOpensTotal() {
        return $this->opens_data->opens_total;
    }
    /**
     * @return int
     */
    public function getUniqueOpens() {
        return $this->opens_data->unique_opens;
    }
    /**
     * @return float
     */
    public function getOpenRate() {
        return $this->opens_data->open_rate;
    }
    /**
     * @return \DateTime
     */
    public function getLastOpen() {
        return new \DateTime($this->opens_data->last_open);
    }
}