@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function exists($key) |
| 91 | 91 | { |
| 92 | - return array_reduce((array) $key, function ($carry, $item) { |
|
| 92 | + return array_reduce((array) $key, function($carry, $item) { |
|
| 93 | 93 | return $carry && array_key_exists($item, $this->all()); |
| 94 | 94 | }, true); |
| 95 | 95 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function has($key) |
| 101 | 101 | { |
| 102 | - return array_reduce((array) $key, function ($carry, $item) { |
|
| 102 | + return array_reduce((array) $key, function($carry, $item) { |
|
| 103 | 103 | return $carry && !$this->isEmptyString($item); |
| 104 | 104 | }, true); |
| 105 | 105 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | $segments = explode('/', trim($this->getUri()->getPath(), '/')); |
| 125 | 125 | |
| 126 | - return array_values(array_filter($segments, function ($segment) { |
|
| 126 | + return array_values(array_filter($segments, function($segment) { |
|
| 127 | 127 | return trim($segment) !== ''; |
| 128 | 128 | })); |
| 129 | 129 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * @param Response $response |
|
| 37 | + * @param ResponseInterface $response |
|
| 38 | 38 | */ |
| 39 | 39 | private function emitStatus(ResponseInterface $response) |
| 40 | 40 | { |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | 'HTTP/%s %d%s', |
| 45 | 45 | $response->protocol(), |
| 46 | 46 | $response->status(), |
| 47 | - ($reasonPhrase ? ' ' . $reasonPhrase : '') |
|
| 47 | + ($reasonPhrase ? ' '.$reasonPhrase : '') |
|
| 48 | 48 | )); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | { |
| 33 | 33 | $this->emitter = $emitter ?: new SapiEmitter; |
| 34 | 34 | |
| 35 | - $this->setResolver(function ($class) { |
|
| 35 | + $this->setResolver(function($class) { |
|
| 36 | 36 | return new $class; |
| 37 | 37 | }); |
| 38 | 38 | } |
@@ -26,26 +26,26 @@ |
||
| 26 | 26 | public function getDefinitions() : array |
| 27 | 27 | { |
| 28 | 28 | return [ |
| 29 | - RequestInterface::class => function () { |
|
| 29 | + RequestInterface::class => function() { |
|
| 30 | 30 | return new Request( |
| 31 | 31 | ServerRequestFactory::fromGlobals() |
| 32 | 32 | ); |
| 33 | 33 | }, |
| 34 | - ResponseInterface::class => function () { |
|
| 34 | + ResponseInterface::class => function() { |
|
| 35 | 35 | return new Response( |
| 36 | 36 | new DiactorosResponse |
| 37 | 37 | ); |
| 38 | 38 | }, |
| 39 | - ResponseFactoryInterface::class => function () { |
|
| 39 | + ResponseFactoryInterface::class => function() { |
|
| 40 | 40 | return new ResponseFactory; |
| 41 | 41 | }, |
| 42 | - Psr7Request::class => function (Container $container) { |
|
| 42 | + Psr7Request::class => function(Container $container) { |
|
| 43 | 43 | return $container->get(RequestInterface::class)->toPsr7(); |
| 44 | 44 | }, |
| 45 | - Psr7Response::class => function (Container $container) { |
|
| 45 | + Psr7Response::class => function(Container $container) { |
|
| 46 | 46 | return $container->get(ResponseInterface::class)->toPsr7(); |
| 47 | 47 | }, |
| 48 | - DispatchRequest::class => function (Container $container) { |
|
| 48 | + DispatchRequest::class => function(Container $container) { |
|
| 49 | 49 | return new DispatchRequest( |
| 50 | 50 | $container->get(RouteDispatcher::class), |
| 51 | 51 | $container->get(ResponseFactoryInterface::class) |