| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.0466 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 61 | 6 | protected function propertiesToArray(array $data): array |
|
| 62 | { |
||
| 63 | 6 | $this->checkRequiredAttributes(); |
|
| 64 | |||
| 65 | 6 | foreach ($this->attributes as $property => $value) { |
|
| 66 | 6 | if (is_null($value) && !$this->isRequired($property)) { |
|
| 67 | continue; |
||
| 68 | } |
||
| 69 | |||
| 70 | 6 | $data[$property] = $this->get($property); |
|
| 71 | } |
||
| 72 | |||
| 73 | 6 | return $data; |
|
| 74 | } |
||
| 76 |