| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.2559 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 2436 | public function validate(array $container, string $item, string $typeName): void |
|
| 39 | { |
||
| 40 | 2436 | if (\array_key_exists($item, $container)) { |
|
| 41 | $error = \sprintf(static::REDEFINITION_ERROR, $typeName . ' ' . $item); |
||
| 42 | throw new TypeConflictException($error, $this->getCallStack()); |
||
| 43 | } |
||
| 44 | 2436 | } |
|
| 45 | } |
||
| 46 |