Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
65 | public function jsonSerialize() |
||
66 | { |
||
67 | $json = new stdClass(); |
||
68 | |||
69 | // might not be set for a new Agency |
||
70 | if ($this->id !== null) { |
||
71 | $json->id = $this->id; |
||
72 | } |
||
73 | |||
74 | $json->name = $this->name; |
||
75 | |||
76 | // might not be set at all |
||
77 | if ($this->countryId !== null) { |
||
78 | $json->countryId = $this->countryId; |
||
79 | } |
||
80 | |||
81 | $json->active = $this->active; |
||
82 | |||
83 | return $json; |
||
84 | } |
||
88 |