Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | * @param array $data mix of objects and scalar values |
||
29 | */ |
||
30 | 1 | public static function entityIdToModel(?array $data): ?array |
|
31 | { |
||
32 | 1 | if ($data === null) { |
|
|
|||
33 | 1 | return null; |
|
34 | } |
||
35 | |||
36 | 1 | foreach ($data as &$value) { |
|
37 | 1 | if ($value instanceof EntityID) { |
|
38 | 1 | $value = $value->getEntity(); |
|
39 | } |
||
40 | } |
||
79 |