| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 54 | public static function properties(array $properties, array $types): array |
|
| 21 | { |
||
| 22 | 54 | $properties += \array_fill_keys(\array_keys($types), null); |
|
| 23 | 54 | foreach ($properties as $key => $value) { |
|
| 24 | 54 | $type = $types[$key] ?? '?string'; |
|
| 25 | 54 | $properties[$key] = Property::cast($type, $value); |
|
| 26 | } |
||
| 27 | |||
| 28 | 54 | return $properties; |
|
| 29 | } |
||
| 54 |