| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 309 | public static function createFromArray(array $attributesKeyValue): array |
|
| 24 | { |
||
| 25 | 309 | $attributes = []; |
|
| 26 | |||
| 27 | /** @var Closure|scalar|null $value */ |
||
| 28 | 309 | foreach ($attributesKeyValue as $name => $value) { |
|
| 29 | 309 | if (is_int($name) && is_string($value)) { |
|
| 30 | 34 | $attributes[] = self::create($value); |
|
| 31 | 34 | continue; |
|
| 32 | } |
||
| 33 | 306 | Assert::string($name); |
|
| 34 | 306 | $attributes[] = self::create($name, $value); |
|
| 35 | } |
||
| 36 | 308 | return $attributes; |
|
| 37 | } |
||
| 58 |