@@ -278,7 +278,9 @@ |
||
278 | 278 | if ($patternOptionalsNumber !== count($segments) - 1) { |
279 | 279 | if (preg_match('~' . self::DYNAMIC_REGEX . '(*SKIP)(*F) | \]~x', $patternWithoutClosingOptionals)) { |
280 | 280 | throw new Exceptions\BadRouteException(Exceptions\BadRouteException::OPTIONAL_SEGMENTS_ON_MIDDLE); |
281 | - } else throw new Exceptions\BadRouteException(Exceptions\BadRouteException::UNCLOSED_OPTIONAL_SEGMENTS); |
|
281 | + } else { |
|
282 | + throw new Exceptions\BadRouteException(Exceptions\BadRouteException::UNCLOSED_OPTIONAL_SEGMENTS); |
|
283 | + } |
|
282 | 284 | } |
283 | 285 | } |
284 | 286 |