@@ -135,7 +135,7 @@ |
||
| 135 | 135 | $this->options = $options; |
| 136 | 136 | |
| 137 | 137 | return \FastRoute\cachedDispatcher( |
| 138 | - function (RouteCollector $fastRouteCollector) use ($routes) { |
|
| 138 | + function(RouteCollector $fastRouteCollector) use ($routes) { |
|
| 139 | 139 | /** |
| 140 | 140 | * @var $route RouteInterface |
| 141 | 141 | */ |
@@ -231,8 +231,8 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | $route = \implode('', $this->group) . $routePattern; |
| 233 | 233 | |
| 234 | - if (substr($route, -1) === '/' && strlen($route) > 1){ |
|
| 235 | - $route = rtrim($route,'/'); |
|
| 234 | + if (substr($route, -1) === '/' && strlen($route) > 1) { |
|
| 235 | + $route = rtrim($route, '/'); |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | return $route; |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | ) |
| 255 | 255 | ); |
| 256 | 256 | $new->collection[] = $addRoute; |
| 257 | - } catch (\Exception $e) { |
|
| 257 | + }catch (\Exception $e) { |
|
| 258 | 258 | if ($throw) { |
| 259 | 259 | throw new RouteException($e->getMessage()); |
| 260 | 260 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $collection->addRoute($routeMethod, $route['path'], $route['handler'], $route['names']); |
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | - } catch (ParseException $e) { |
|
| 71 | + }catch (ParseException $e) { |
|
| 72 | 72 | throw new RouterException($e->getMessage()); |
| 73 | 73 | } |
| 74 | 74 | |