Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.2559 |
Changes | 0 |
1 | <?php |
||
50 | 17 | protected function validate(DefinitionInterface $definition, string $expectedDefinitionClass): void |
|
51 | { |
||
52 | 17 | if (!$definition instanceof $expectedDefinitionClass) { |
|
53 | $actualType = get_class($definition); |
||
54 | |||
55 | throw new InvalidArgumentException("Argument \$definition must be $expectedDefinitionClass, $actualType given"); |
||
56 | } |
||
57 | 17 | } |
|
58 | } |
||
59 |