Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
50 | public function setResolvers(array $resolvers) |
||
51 | { |
||
52 | foreach ($resolvers as $old => $new) { |
||
53 | if (!class_exists($new)) { |
||
54 | throw new InvalidArgumentException( |
||
55 | sprintf( |
||
56 | '%s is resolved to the entity %s, which does not exist', |
||
57 | $old, |
||
58 | $new |
||
59 | ) |
||
60 | ); |
||
61 | } |
||
62 | |||
63 | $this->resolvers[$old] = $new; |
||
64 | } |
||
65 | } |
||
66 | |||
75 |