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