Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
21 | abstract class AbstractEntity implements EntityInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $container = []; |
||
27 | |||
28 | /** |
||
29 | * Returns entity data as an array. |
||
30 | * |
||
31 | * @return array |
||
32 | */ |
||
33 | 6 | public function toArray(): array |
|
34 | { |
||
35 | 6 | return $this->container; |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * Fills entity from an arrray. |
||
40 | * |
||
41 | * @param array $arrayData |
||
42 | */ |
||
43 | 23 | public function fromArray(array $arrayData): void |
|
54 | } |
||
55 | 22 | } |
|
57 |