Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
60 | 2 | public static function from(array $ids) |
|
61 | { |
||
62 | 2 | $references = []; |
|
63 | |||
64 | 2 | foreach ($ids as $key => $id) { |
|
65 | 2 | if (!is_string($id)) { |
|
66 | 1 | throw new InvalidConfigException('Values of an array must be string alias or class name.'); |
|
67 | } |
||
68 | 2 | $references[$key] = DynamicReference::to($id); |
|
69 | } |
||
70 | |||
71 | 1 | return $references; |
|
72 | } |
||
74 |