@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | {
|
| 7 | 7 | protected $app; |
| 8 | 8 | |
| 9 | - public function __construct( Application $app) |
|
| 9 | + public function __construct(Application $app) |
|
| 10 | 10 | {
|
| 11 | 11 | $this->app = $app; |
| 12 | 12 | } |
@@ -14,15 +14,15 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | public function match(Route $route) : array |
| 16 | 16 | {
|
| 17 | - assert( isset($this->app['request'])); |
|
| 17 | + assert(isset($this->app['request'])); |
|
| 18 | 18 | |
| 19 | - $verbRegexp= '#^' . $route->getHttpVerb() . '$#i'; // case insensitive |
|
| 20 | - $pathRegexp= '#^' . $route->getPath() . '$#'; // case sensitive |
|
| 19 | + $verbRegexp = '#^'.$route->getHttpVerb().'$#i'; // case insensitive |
|
| 20 | + $pathRegexp = '#^'.$route->getPath().'$#'; // case sensitive |
|
| 21 | 21 | |
| 22 | 22 | $matches = null; |
| 23 | 23 | try {
|
| 24 | 24 | preg_match($verbRegexp, $this->app['request']->getMethod()) && |
| 25 | - preg_match($pathRegexp, $this->app['request']->getPathInfo(),$matches); |
|
| 25 | + preg_match($pathRegexp, $this->app['request']->getPathInfo(), $matches); |
|
| 26 | 26 | } catch (Exception $e) {// just ignore regexp errors...}
|
| 27 | 27 | |
| 28 | 28 | return $matches; |