| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | trait Serializable |
||
| 16 | { |
||
| 17 | /** Default implementation to dynamically serialize all public properties. Can be overridden for increased control. */ |
||
| 18 | public function toArray(): array |
||
| 19 | { |
||
| 20 | return $this->automaticallySerialize(); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** Recursively serialize Arrayables */ |
||
| 24 | public function arraySerialize(): array |
||
| 27 | } |
||
| 28 | |||
| 29 | /** @inheritDoc */ |
||
| 30 | public function jsonSerialize(): array |
||
| 31 | { |
||
| 32 | return $this->arraySerialize(); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** @param int $options */ |
||
| 36 | public function toJson($options = 0): string |
||
| 39 | } |
||
| 40 | |||
| 41 | /** Automatically serialize all public properties. */ |
||
| 42 | protected function automaticallySerialize(): array |
||
| 49 |