| Conditions | 5 | 
| Paths | 6 | 
| Total Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 6 | 
| CRAP Score | 5 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 11 | 152 | public function jsonSerialize(): ?array | |
| 12 |     { | ||
| 13 | 152 | $properties = $this->normalizeRequiredProperties(); | |
| 14 | |||
| 15 | 152 |         foreach ($this->normalizeOptionalProperties() as $name => $value) { | |
| 16 | 142 |             if ($value !== null && $value !== []) { | |
| 17 | 83 | $properties[$name] = $value; | |
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | 152 | return $properties ?: null; | |
| 22 | } | ||
| 23 | |||
| 42 |