Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
4 / 4
CRAP
100.00% covered (success)
100.00%
5 / 5
Alberthorta\Bonobo\Report\Ecommerce
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
4 / 4
4
100.00% covered (success)
100.00%
5 / 5
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 getTotalOrders
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getTotalSpent
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getTotalRevenue
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
<?php
namespace Alberthorta\Bonobo\Report;
class Ecommerce {
    protected $ecommerce_data;
    /**
     * Ecommerce constructor.
     * @param $ecommerce_data
     */
    public function __construct($ecommerce_data) {
        $this->ecommerce_data = $ecommerce_data;
    }
    /**
     * @return int
     */
    public function getTotalOrders() {
        return $this->ecommerce_data->total_orders;
    }
    /**
     * @return float
     */
    public function getTotalSpent() {
        return $this->ecommerce_data->total_spent;
    }
    /**
     * @return float
     */
    public function getTotalRevenue() {
        return $this->ecommerce_data->total_revenue;
    }
}