Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | abstract class BaseModel implements Model |
||
16 | { |
||
17 | /** |
||
18 | * @return array<TKey,TValue> |
||
19 | */ |
||
20 | abstract public function __toArray(): array; |
||
21 | |||
22 | /** |
||
23 | * @return array<TKey,TValue> |
||
24 | */ |
||
25 | 2 | public function toArray(): array |
|
26 | { |
||
27 | 2 | return $this->__toArray(); |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return array<TKey,TValue> |
||
32 | */ |
||
33 | 2 | public function jsonSerialize(): array |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * @throws \JsonException |
||
40 | */ |
||
41 | 2 | public function __toString(): string |
|
46 |