Completed
Push — 3.x ( f68e58...afef74 )
by Sam
12s
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/Http/Response.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
      */
208 208
     protected function filterStatus($status)
209 209
     {
210
-        if (!is_integer($status) || $status<100 || $status>599) {
210
+        if (!is_integer($status) || $status < 100 || $status > 599) {
211 211
             throw new InvalidArgumentException('Invalid HTTP status code');
212 212
         }
213 213
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
      *
123 123
      * @var string
124 124
      */
125
-     const EOL = "\r\n";
125
+        const EOL = "\r\n";
126 126
 
127 127
     /**
128 128
      * Create new HTTP response.
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/App.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
         $router = $this->container->get('router');
434 434
 
435 435
         // If router hasn't been dispatched or the URI changed then dispatch
436
-        if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string) $request->getUri()])) {
436
+        if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string)$request->getUri()])) {
437 437
             $request = $this->dispatchRouterAndPrepareRoute($request, $router);
438 438
             $routeInfo = $request->getAttribute('routeInfo');
439 439
         }
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
             $request = $request->withAttribute('route', $route);
526 526
         }
527 527
 
528
-        $routeInfo['request'] = [$request->getMethod(), (string) $request->getUri()];
528
+        $routeInfo['request'] = [$request->getMethod(), (string)$request->getUri()];
529 529
 
530 530
         return $request->withAttribute('routeInfo', $routeInfo);
531 531
     }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
             }
555 555
             $size = $response->getBody()->getSize();
556 556
             if ($size !== null && !$response->hasHeader('Content-Length')) {
557
-                $response = $response->withHeader('Content-Length', (string) $size);
557
+                $response = $response->withHeader('Content-Length', (string)$size);
558 558
             }
559 559
         }
560 560
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
             }
127 127
         }
128 128
 
129
-        throw new \BadMethodCallException("Method $method is not a valid method");
129
+        throw new \BadMethodCallException("method $method is not a valid method");
130 130
     }
131 131
 
132 132
     /********************************************************************************
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@  discard block
 block discarded – undo
14 14
 use Throwable;
15 15
 use Closure;
16 16
 use InvalidArgumentException;
17
-use Psr\Http\Message\RequestInterface;
18 17
 use Psr\Http\Message\ServerRequestInterface;
19 18
 use Psr\Http\Message\ResponseInterface;
20 19
 use Psr\Container\ContainerInterface;
@@ -26,7 +25,6 @@  discard block
 block discarded – undo
26 25
 use Slim\Http\Headers;
27 26
 use Slim\Http\Body;
28 27
 use Slim\Http\Request;
29
-use Slim\Interfaces\Http\EnvironmentInterface;
30 28
 use Slim\Interfaces\RouteGroupInterface;
31 29
 use Slim\Interfaces\RouteInterface;
32 30
 use Slim\Interfaces\RouterInterface;
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
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
          *
95 95
          * @return array|\ArrayAccess
96 96
          */
97
-        $this['settings'] = function () use ($userSettings, $defaultSettings) {
97
+        $this['settings'] = function() use ($userSettings, $defaultSettings) {
98 98
             return new Collection(array_merge($defaultSettings, $userSettings));
99 99
         };
100 100
 
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
@@ -188,7 +188,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Slim/Handlers/NotFound.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,6 +121,6 @@
 block discarded – undo
121 121
         <a href='$homeUrl'>Visit the Home Page</a>
122 122
     </body>
123 123
 </html>
124
-END;
124
+end;
125 125
     }
126 126
 }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * Render plain not found message
69 69
      *
70
-     * @return ResponseInterface
70
+     * @return string
71 71
      */
72 72
     protected function renderPlainNotFoundOutput()
73 73
     {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     /**
78 78
      * Return a response for application/json content not found
79 79
      *
80
-     * @return ResponseInterface
80
+     * @return string
81 81
      */
82 82
     protected function renderJsonNotFoundOutput()
83 83
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * Return a response for xml content not found
89 89
      *
90
-     * @return ResponseInterface
90
+     * @return string
91 91
      */
92 92
     protected function renderXmlNotFoundOutput()
93 93
     {
Please login to merge, or discard this patch.
Slim/Handlers/NotAllowed.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Slim/Route.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.