| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 43 | public function generateForProperty(FieldMetadata $field, FakeMock $fakemock, ?string $group = null) |
|
| 23 | { |
||
| 24 | 43 | if (!$field->configuration->recursive) { |
|
|
|
|||
| 25 | 4 | return null; |
|
| 26 | } |
||
| 27 | |||
| 28 | 39 | $value = $this->classMapper->getObjectForField($field); |
|
| 29 | 39 | if (!$value) { |
|
| 30 | 39 | return null; |
|
| 31 | } |
||
| 32 | |||
| 33 | 8 | $value = $fakemock->fill($value); |
|
| 34 | |||
| 35 | 8 | return $value; |
|
| 36 | } |
||
| 43 |
If an expression can have both
false, andnullas possible values. It is generally a good practice to always use strict comparison to clearly distinguish between those two values.