| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | 8 | private function validateFormatter(string $formatterClass) |
|
| 50 | { |
||
| 51 | 8 | $formatterInterface = FormatterInterface::class; |
|
| 52 | 8 | if (! (new \ReflectionClass($formatterClass))->implementsInterface($formatterInterface)) { |
|
| 53 | 1 | throw new \InvalidArgumentException("{$formatterClass} doesn't implement {$formatterInterface}"); |
|
| 54 | } |
||
| 55 | 7 | } |
|
| 56 | } |
||
| 57 |