Total Complexity | 5 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | abstract class AbstractDataObject implements DataObjectInterface |
||
13 | { |
||
14 | protected string $entityIdFieldName; |
||
15 | |||
16 | protected array $data; |
||
17 | |||
18 | public function __construct(array $data) |
||
19 | { |
||
20 | $this->data = $data; |
||
21 | } |
||
22 | |||
23 | final public function toArray(): array |
||
26 | } |
||
27 | |||
28 | final public function toJson(): string |
||
29 | { |
||
30 | return json_encode($this->data); |
||
31 | } |
||
32 | |||
33 | final public function getEntityId(): ?int |
||
36 | } |
||
37 | } |
||
38 |