| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public static function guardAgainstInvalidUrlGenerator(string $urlGeneratorClass) |
||
| 36 | { |
||
| 37 | if (! class_exists($urlGeneratorClass)) { |
||
| 38 | throw InvalidUrlGenerator::doesntExist($urlGeneratorClass); |
||
| 39 | } |
||
| 40 | |||
| 41 | if (! is_subclass_of($urlGeneratorClass, UrlGenerator::class)) { |
||
|
|
|||
| 42 | throw InvalidUrlGenerator::isntAUrlGenerator($urlGeneratorClass); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 |