| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | private static function hasValidFormat(string $path): bool |
||
| 25 | 107 | { |
|
| 26 | 1 | if ($path === '') { |
|
| 27 | return false; |
||
| 28 | } |
||
| 29 | 106 | ||
| 30 | 106 | if (str_starts_with($path, '/')) { |
|
| 31 | return false; |
||
| 32 | 106 | } |
|
| 33 | 106 | ||
| 34 | 1 | if (str_ends_with($path, '/')) { |
|
| 35 | 106 | return false; |
|
| 36 | 10 | } |
|
| 37 | 106 | ||
| 38 | 2 | return !self::hasEmptyParts($path); |
|
| 39 | } |
||
| 73 |