| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function setResolvers(array $resolvers) : void |
||
| 49 | { |
||
| 50 | foreach ($resolvers as $old => $new) { |
||
| 51 | 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 | $this->resolvers[$old] = $new; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 73 |