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