| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 26 | public static function guardAgainstInvalidUrlGenerator(string $urlGeneratorClass) |
||
| 27 | { |
||
| 28 | if (!class_exists($urlGeneratorClass)) { |
||
| 29 | throw InvalidUrlGenerator::doesntExist($urlGeneratorClass); |
||
| 30 | } |
||
| 31 | |||
| 32 | if (!is_subclass_of($urlGeneratorClass, UrlGenerator::class)) { |
||
|
|
|||
| 33 | throw InvalidUrlGenerator::isntAUrlGenerator($urlGeneratorClass); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 |