@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return EnvironmentInterface |
46 | 46 | */ |
47 | - $container['environment'] = function () { |
|
47 | + $container['environment'] = function() { |
|
48 | 48 | return new Environment($_SERVER); |
49 | 49 | }; |
50 | 50 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * |
58 | 58 | * @return ServerRequestInterface |
59 | 59 | */ |
60 | - $container['request'] = function ($container) { |
|
60 | + $container['request'] = function($container) { |
|
61 | 61 | return Request::createFromEnvironment($container->get('environment')); |
62 | 62 | }; |
63 | 63 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @return ResponseInterface |
72 | 72 | */ |
73 | - $container['response'] = function ($container) { |
|
73 | + $container['response'] = function($container) { |
|
74 | 74 | $headers = new Headers(['Content-Type' => 'text/html; charset=UTF-8']); |
75 | 75 | $response = new Response(200, $headers); |
76 | 76 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * |
88 | 88 | * @return RouterInterface |
89 | 89 | */ |
90 | - $container['router'] = function ($container) { |
|
90 | + $container['router'] = function($container) { |
|
91 | 91 | $routerCacheFile = false; |
92 | 92 | if (isset($container->get('settings')['routerCacheFile'])) { |
93 | 93 | $routerCacheFile = $container->get('settings')['routerCacheFile']; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * |
105 | 105 | * @return InvocationStrategyInterface |
106 | 106 | */ |
107 | - $container['foundHandler'] = function () { |
|
107 | + $container['foundHandler'] = function() { |
|
108 | 108 | return new RequestResponse; |
109 | 109 | }; |
110 | 110 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @return callable |
127 | 127 | */ |
128 | - $container['phpErrorHandler'] = function ($container) { |
|
128 | + $container['phpErrorHandler'] = function($container) { |
|
129 | 129 | return new PhpError($container->get('settings')['displayErrorDetails']); |
130 | 130 | }; |
131 | 131 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * |
147 | 147 | * @return callable |
148 | 148 | */ |
149 | - $container['errorHandler'] = function ($container) { |
|
149 | + $container['errorHandler'] = function($container) { |
|
150 | 150 | return new Error($container->get('settings')['displayErrorDetails']); |
151 | 151 | }; |
152 | 152 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * |
165 | 165 | * @return callable |
166 | 166 | */ |
167 | - $container['notFoundHandler'] = function () { |
|
167 | + $container['notFoundHandler'] = function() { |
|
168 | 168 | return new NotFound; |
169 | 169 | }; |
170 | 170 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @return callable |
185 | 185 | */ |
186 | - $container['notAllowedHandler'] = function () { |
|
186 | + $container['notAllowedHandler'] = function() { |
|
187 | 187 | return new NotAllowed; |
188 | 188 | }; |
189 | 189 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * |
197 | 197 | * @return CallableResolverInterface |
198 | 198 | */ |
199 | - $container['callableResolver'] = function ($container) { |
|
199 | + $container['callableResolver'] = function($container) { |
|
200 | 200 | return new CallableResolver($container); |
201 | 201 | }; |
202 | 202 | } |
@@ -188,7 +188,7 @@ |
||
188 | 188 | return $this->dispatcher; |
189 | 189 | } |
190 | 190 | |
191 | - $routeDefinitionCallback = function (RouteCollector $r) { |
|
191 | + $routeDefinitionCallback = function(RouteCollector $r) { |
|
192 | 192 | foreach ($this->getRoutes() as $route) { |
193 | 193 | $r->addRoute($route->getMethods(), $route->getPattern(), $route->getIdentifier()); |
194 | 194 | } |
@@ -183,7 +183,7 @@ |
||
183 | 183 | * |
184 | 184 | * @param string[] $methods Array of HTTP methods |
185 | 185 | * @param string $pattern The route pattern |
186 | - * @param callable $handler The route callable |
|
186 | + * @param callable $callable |
|
187 | 187 | * |
188 | 188 | * @return \Slim\Interfaces\RouteInterface |
189 | 189 | */ |
@@ -140,7 +140,7 @@ |
||
140 | 140 | <p>Method not allowed. Must be one of: <strong>$allow</strong></p> |
141 | 141 | </body> |
142 | 142 | </html> |
143 | -END; |
|
143 | +end; |
|
144 | 144 | |
145 | 145 | return $output; |
146 | 146 | } |
@@ -72,7 +72,7 @@ |
||
72 | 72 | /** |
73 | 73 | * Create new route |
74 | 74 | * |
75 | - * @param string|string[] $methods The route HTTP methods |
|
75 | + * @param string[] $methods The route HTTP methods |
|
76 | 76 | * @param string $pattern The route pattern |
77 | 77 | * @param callable $callable The route callable |
78 | 78 | * @param RouteGroup[] $groups The parent route groups |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use InvalidArgumentException; |
13 | 13 | use Psr\Http\Message\ServerRequestInterface; |
14 | 14 | use Psr\Http\Message\ResponseInterface; |
15 | -use Slim\Exception\SlimException; |
|
16 | 15 | use Slim\Handlers\Strategies\RequestResponse; |
17 | 16 | use Slim\Interfaces\InvocationStrategyInterface; |
18 | 17 | use Slim\Interfaces\RouteInterface; |