| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.125 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 56 | public function setResolvers(array $resolvers) |
|
| 51 | { |
||
| 52 | 56 | foreach ($resolvers as $old => $new) { |
|
| 53 | 56 | 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 | 56 | $this->resolvers[$old] = $new; |
|
| 64 | 56 | } |
|
| 65 | 56 | } |
|
| 66 | |||
| 75 |