| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class AbstractEntity |
||
| 8 | { |
||
| 9 | use TraitData { |
||
| 10 | mapFromArray as traitMapFromArray; |
||
| 11 | mapToArray as traitMapToArray; |
||
| 12 | } |
||
| 13 | |||
| 14 | protected $id; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return int|string|null |
||
| 18 | */ |
||
| 19 | public function getId() |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param int|string $id |
||
| 26 | */ |
||
| 27 | public function setId($id) |
||
| 28 | { |
||
| 29 | $this->id = $id; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param array $data |
||
| 34 | * @param bool $update |
||
| 35 | */ |
||
| 36 | public function mapFromArray(array $data, bool $update = false) |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return array |
||
| 46 | */ |
||
| 47 | public function mapToArray(): array |
||
| 54 |