Total Complexity | 10 |
Total Lines | 80 |
Duplicated Lines | 0 % |
Coverage | 44% |
Changes | 0 |
1 | <?php |
||
23 | class Sale implements SaleInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @var TargetInterface |
||
32 | */ |
||
33 | protected $target; |
||
34 | |||
35 | /** |
||
36 | * @var CustomerInterface |
||
37 | */ |
||
38 | protected $customer; |
||
39 | |||
40 | /** |
||
41 | * @var PlanInterface |
||
42 | */ |
||
43 | protected $plan; |
||
44 | |||
45 | /** |
||
46 | * @var DateTimeImmutable |
||
47 | */ |
||
48 | protected $time; |
||
49 | |||
50 | 7 | public function __construct( |
|
51 | $id, |
||
52 | TargetInterface $target, |
||
53 | CustomerInterface $customer, |
||
54 | PlanInterface $plan, |
||
55 | DateTimeImmutable $time = null |
||
56 | ) { |
||
57 | 7 | $this->id = $id; |
|
58 | 7 | $this->target = $target; |
|
59 | 7 | $this->customer = $customer; |
|
60 | 7 | $this->plan = $plan; |
|
61 | 7 | $this->time = $time; |
|
62 | 7 | } |
|
63 | |||
64 | public function getId() |
||
65 | { |
||
66 | return $this->id; |
||
67 | } |
||
68 | |||
69 | public function getTarget() |
||
72 | } |
||
73 | |||
74 | public function getCustomer() |
||
77 | } |
||
78 | |||
79 | 2 | public function getPlan() |
|
80 | { |
||
81 | 2 | return $this->plan; |
|
82 | } |
||
83 | |||
84 | 4 | public function getTime() |
|
85 | { |
||
86 | 4 | return $this->time; |
|
87 | } |
||
88 | |||
89 | public function hasId() |
||
92 | } |
||
93 | |||
94 | public function setId($id) |
||
95 | { |
||
103 | } |
||
104 | } |
||
105 |