@@ -9,7 +9,7 @@ |
||
9 | 9 | namespace JetFire\Routing\Match; |
10 | 10 | |
11 | 11 | |
12 | -class CustomMatch extends RoutesMatch implements MatcherInterface{ |
|
12 | +class CustomMatch extends RoutesMatch implements MatcherInterface { |
|
13 | 13 | |
14 | 14 | |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | $this->collection = $collection; |
46 | 46 | $this->route = new Route(); |
47 | - $this->config['di'] = function($class){ |
|
47 | + $this->config['di'] = function($class) { |
|
48 | 48 | return new $class; |
49 | 49 | }; |
50 | 50 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * @param string $matcher |
70 | 70 | */ |
71 | - public function addMatcher($matcher){ |
|
71 | + public function addMatcher($matcher) { |
|
72 | 72 | $this->config['matcher'][] = $matcher; |
73 | 73 | } |
74 | 74 | |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | { |
147 | 147 | if (isset($this->route->getResponse()['templates']) && isset($this->route->getResponse()['templates'][$this->route->getResponse('code')])) { |
148 | 148 | $this->route->setCallback($this->route->getResponse()['templates'][$this->route->getResponse('code')]); |
149 | - foreach($this->config['matcherInstance'] as $matcher) { |
|
149 | + foreach ($this->config['matcherInstance'] as $matcher) { |
|
150 | 150 | foreach (call_user_func([$matcher, 'getMatcher']) as $match) |
151 | - if (call_user_func([$matcher, $match])){ $this->callTarget(); break; } |
|
151 | + if (call_user_func([$matcher, $match])) { $this->callTarget(); break; } |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | http_response_code($this->route->getResponse('code')); |