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 |
||
64 | 2 | public static function from(array $ids) |
|
65 | { |
||
66 | 2 | $references = []; |
|
67 | |||
68 | 2 | foreach ($ids as $key => $id) { |
|
69 | 2 | if (!is_string($id)) { |
|
70 | 1 | throw new InvalidConfigException('Values of an array must be string alias or class name.'); |
|
71 | } |
||
72 | 2 | $references[$key] = Reference::to($id); |
|
73 | } |
||
74 | |||
75 | 1 | return $references; |
|
76 | } |
||
78 |