Total Complexity | 10 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Coverage | 65% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | class Customer implements CustomerInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var integer |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $login; |
||
29 | |||
30 | /** |
||
31 | * @var CustomerInterface |
||
32 | */ |
||
33 | protected $seller; |
||
34 | |||
35 | /** |
||
36 | * @var Customer[] |
||
37 | */ |
||
38 | protected $sellers = []; |
||
39 | |||
40 | 40 | public function __construct($id, $login, CustomerInterface $seller = null) |
|
41 | { |
||
42 | 40 | $this->id = $id; |
|
43 | 40 | $this->login = $login; |
|
44 | 40 | $this->seller = $seller; |
|
45 | 40 | } |
|
46 | |||
47 | 1 | public function getId() |
|
48 | { |
||
49 | 1 | return $this->id; |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 1 | public function getUniqueId() |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 6 | public function getLogin() |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 5 | public function getSeller() |
|
72 | { |
||
73 | 5 | return $this->seller; |
|
74 | } |
||
75 | |||
76 | public static function fromArray(array $info) |
||
85 | } |
||
86 | |||
87 | public function jsonSerialize(): array |
||
92 |