Completed
Push — 3.x ( c13855...2f189b )
by Sam
04:02
created
example/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
  * argument for `Slim::get`, `Slim::post`, `Slim::put`, `Slim::patch`, and `Slim::delete`
27 27
  * is an anonymous function.
28 28
  */
29
-$app->get('/', function ($request, $response, $args) {
29
+$app->get('/', function($request, $response, $args) {
30 30
     $response->write("Welcome to Slim!");
31 31
     return $response;
32 32
 });
33 33
 
34
-$app->get('/hello[/{name}]', function ($request, $response, $args) {
34
+$app->get('/hello[/{name}]', function($request, $response, $args) {
35 35
     $response->write("Hello, " . $args['name']);
36 36
     return $response;
37 37
 })->setArgument('name', 'World!');
Please login to merge, or discard this patch.
Slim/App.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
         $router = $this->container->get('router');
467 467
 
468 468
         // If router hasn't been dispatched or the URI changed then dispatch
469
-        if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string) $request->getUri()])) {
469
+        if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string)$request->getUri()])) {
470 470
             $request = $this->dispatchRouterAndPrepareRoute($request, $router);
471 471
             $routeInfo = $request->getAttribute('routeInfo');
472 472
         }
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             $request = $request->withAttribute('route', $route);
559 559
         }
560 560
 
561
-        $routeInfo['request'] = [$request->getMethod(), (string) $request->getUri()];
561
+        $routeInfo['request'] = [$request->getMethod(), (string)$request->getUri()];
562 562
 
563 563
         return $request->withAttribute('routeInfo', $routeInfo);
564 564
     }
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
             }
588 588
             $size = $response->getBody()->getSize();
589 589
             if ($size !== null && !$response->hasHeader('Content-Length')) {
590
-                $response = $response->withHeader('Content-Length', (string) $size);
590
+                $response = $response->withHeader('Content-Length', (string)$size);
591 591
             }
592 592
         }
593 593
 
Please login to merge, or discard this patch.
Slim/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
          *
93 93
          * @return array|\ArrayAccess
94 94
          */
95
-        $this['settings'] = function () use ($userSettings, $defaultSettings) {
95
+        $this['settings'] = function() use ($userSettings, $defaultSettings) {
96 96
             return new Collection(array_merge($defaultSettings, $userSettings));
97 97
         };
98 98
 
Please login to merge, or discard this patch.
Slim/MiddlewareAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             $this->seedMiddlewareStack();
64 64
         }
65 65
         $next = $this->stack->top();
66
-        $this->stack[] = function (
66
+        $this->stack[] = function(
67 67
             ServerRequestInterface $request,
68 68
             ResponseInterface $response
69 69
         ) use (
Please login to merge, or discard this patch.
Slim/Http/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
      */
212 212
     protected function filterStatus($status)
213 213
     {
214
-        if (!is_integer($status) || $status<100 || $status>599) {
214
+        if (!is_integer($status) || $status < 100 || $status > 599) {
215 215
             throw new InvalidArgumentException('Invalid HTTP status code');
216 216
         }
217 217
 
Please login to merge, or discard this patch.
Slim/Http/Headers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $key = strtoupper($key);
57 57
             if (isset(static::$special[$key]) || strpos($key, 'HTTP_') === 0) {
58 58
                 if ($key !== 'HTTP_CONTENT_LENGTH') {
59
-                    $data[$key] =  $value;
59
+                    $data[$key] = $value;
60 60
                 }
61 61
             }
62 62
         }
Please login to merge, or discard this patch.
Slim/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
222 222
             return $this->dispatcher;
223 223
         }
224 224
 
225
-        $routeDefinitionCallback = function (RouteCollector $r) {
225
+        $routeDefinitionCallback = function(RouteCollector $r) {
226 226
             foreach ($this->getRoutes() as $route) {
227 227
                 $r->addRoute($route->getMethods(), $route->getPattern(), $route->getIdentifier());
228 228
             }
Please login to merge, or discard this patch.
Slim/Handlers/AbstractError.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function __construct($displayErrorDetails = false)
27 27
     {
28
-        $this->displayErrorDetails = (bool) $displayErrorDetails;
28
+        $this->displayErrorDetails = (bool)$displayErrorDetails;
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
Slim/DefaultServicesProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
              *
44 44
              * @return EnvironmentInterface
45 45
              */
46
-            $container['environment'] = function () {
46
+            $container['environment'] = function() {
47 47
                 return new Environment($_SERVER);
48 48
             };
49 49
         }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
              *
57 57
              * @return ServerRequestInterface
58 58
              */
59
-            $container['request'] = function ($container) {
59
+            $container['request'] = function($container) {
60 60
                 return Request::createFromEnvironment($container->get('environment'));
61 61
             };
62 62
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
              *
70 70
              * @return ResponseInterface
71 71
              */
72
-            $container['response'] = function ($container) {
72
+            $container['response'] = function($container) {
73 73
                 $headers = new Headers(['Content-Type' => 'text/html; charset=UTF-8']);
74 74
                 $response = new Response(200, $headers);
75 75
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
              *
87 87
              * @return RouterInterface
88 88
              */
89
-            $container['router'] = function ($container) {
89
+            $container['router'] = function($container) {
90 90
                 $routerCacheFile = false;
91 91
                 if (isset($container->get('settings')['routerCacheFile'])) {
92 92
                     $routerCacheFile = $container->get('settings')['routerCacheFile'];
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
              *
110 110
              * @return InvocationStrategyInterface
111 111
              */
112
-            $container['foundHandler'] = function () {
112
+            $container['foundHandler'] = function() {
113 113
                 return new RequestResponse;
114 114
             };
115 115
         }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
              *
131 131
              * @return callable
132 132
              */
133
-            $container['phpErrorHandler'] = function ($container) {
133
+            $container['phpErrorHandler'] = function($container) {
134 134
                 return new PhpError($container->get('settings')['displayErrorDetails']);
135 135
             };
136 136
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
              *
152 152
              * @return callable
153 153
              */
154
-            $container['errorHandler'] = function ($container) {
154
+            $container['errorHandler'] = function($container) {
155 155
                 return new Error($container->get('settings')['displayErrorDetails']);
156 156
             };
157 157
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
              *
170 170
              * @return callable
171 171
              */
172
-            $container['notFoundHandler'] = function () {
172
+            $container['notFoundHandler'] = function() {
173 173
                 return new NotFound;
174 174
             };
175 175
         }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
              *
189 189
              * @return callable
190 190
              */
191
-            $container['notAllowedHandler'] = function () {
191
+            $container['notAllowedHandler'] = function() {
192 192
                 return new NotAllowed;
193 193
             };
194 194
         }
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
              *
202 202
              * @return CallableResolverInterface
203 203
              */
204
-            $container['callableResolver'] = function ($container) {
204
+            $container['callableResolver'] = function($container) {
205 205
                 return new CallableResolver($container);
206 206
             };
207 207
         }
Please login to merge, or discard this patch.