| Total Complexity | 11 |
| Total Lines | 85 |
| Duplicated Lines | 0 % |
| Coverage | 42.31% |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 24 | class Sale implements SaleInterface |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | protected $id; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var TargetInterface |
||
| 33 | */ |
||
| 34 | protected $target; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var CustomerInterface |
||
| 38 | */ |
||
| 39 | protected $customer; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var PlanInterface |
||
| 43 | */ |
||
| 44 | protected $plan; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var DateTimeImmutable |
||
| 48 | */ |
||
| 49 | protected $time; |
||
| 50 | 11 | ||
| 51 | public function __construct( |
||
| 63 | } |
||
| 64 | |||
| 65 | public function getId() |
||
| 66 | { |
||
| 67 | return $this->id; |
||
| 68 | } |
||
| 69 | |||
| 70 | public function getTarget() |
||
| 73 | } |
||
| 74 | |||
| 75 | public function getCustomer() |
||
| 76 | { |
||
| 77 | return $this->customer; |
||
| 78 | } |
||
| 79 | 2 | ||
| 80 | public function getPlan() |
||
| 81 | 2 | { |
|
| 82 | return $this->plan; |
||
| 83 | } |
||
| 84 | 8 | ||
| 85 | public function getTime() |
||
| 86 | 8 | { |
|
| 87 | return $this->time; |
||
| 88 | } |
||
| 89 | |||
| 90 | public function hasId() |
||
| 91 | { |
||
| 92 | return $this->id !== null; |
||
| 93 | } |
||
| 94 | |||
| 95 | public function setId($id) |
||
| 104 | } |
||
| 105 | |||
| 106 | public function jsonSerialize() |
||
| 107 | { |
||
| 108 | return array_filter(get_object_vars($this)); |
||
| 109 | } |
||
| 110 | } |
||
| 111 |