Completed
Branch master (163fd9)
by Neomerx
05:13
created
src/Application/Application.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     /**
276 276
      * @param Closure            $handler
277 277
      * @param ContainerInterface $userContainer
278
-     * @param array|null         $globalMiddleware
278
+     * @param callable[]         $globalMiddleware
279 279
      * @param array|null         $routeMiddleware
280 280
      *
281 281
      * @return Closure
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
      * @param int|string $key
331 331
      * @param mixed      $default
332 332
      *
333
-     * @return mixed
333
+     * @return string
334 334
      */
335 335
     private function getValue(array $config, $key, $default)
336 336
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 use LogicException;
29 29
 use Psr\Http\Message\ResponseInterface;
30 30
 use Psr\Http\Message\ServerRequestInterface;
31
-use Zend\Diactoros\Response;
32 31
 use Zend\Diactoros\Response\EmptyResponse;
33 32
 use Zend\Diactoros\ServerRequest;
34 33
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         array $handlerParams,
244 244
         ContainerInterface $container
245 245
     ) {
246
-        return function (ServerRequestInterface $request = null) use ($handler, $handlerParams, $container) {
246
+        return function(ServerRequestInterface $request = null) use ($handler, $handlerParams, $container) {
247 247
             return call_user_func($handler, $handlerParams, $container, $request);
248 248
         };
249 249
     }
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     private function createMethodNotAllowedTerminalHandler(array $allowedMethods)
257 257
     {
258 258
         // 405 Method Not Allowed
259
-        return function () use ($allowedMethods) {
259
+        return function() use ($allowedMethods) {
260 260
             return $this->createEmptyResponse(405, ['Accept' => implode(',', $allowedMethods)]);
261 261
         };
262 262
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     private function createNotFoundTerminalHandler()
268 268
     {
269 269
         // 404 Not Found
270
-        return function () {
270
+        return function() {
271 271
             return $this->createEmptyResponse(404);
272 272
         };
273 273
     }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      */
321 321
     private function createMiddlewareChainLink(Closure $next, callable $middleware, ContainerInterface $userContainer)
322 322
     {
323
-        return function (ServerRequestInterface $request) use ($next, $middleware, $userContainer) {
323
+        return function(ServerRequestInterface $request) use ($next, $middleware, $userContainer) {
324 324
             return call_user_func($middleware, $request, $next, $userContainer);
325 325
         };
326 326
     }
Please login to merge, or discard this patch.
src/Routing/Group.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 class Group extends BaseGroup
23 23
 {
24 24
     /**
25
-     * @return null
25
+     * @return null|\Limoncello\Core\Contracts\Routing\GroupInterface
26 26
      */
27 27
     public function parentGroup()
28 28
     {
Please login to merge, or discard this patch.
src/Application/Sapi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         $this->sapiEmitter = $sapiEmitter;
105 105
 
106 106
         // returns value if not null or $fallback otherwise
107
-        $get = function ($nullable, $fallback) {
107
+        $get = function($nullable, $fallback) {
108 108
             return $nullable !== null ? $nullable : $fallback;
109 109
         };
110 110
 
Please login to merge, or discard this patch.
src/Routing/Traits/UriTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
     protected function normalizeUri($uri, $trailingSlash)
31 31
     {
32 32
         // add starting '/' and cut ending '/' if necessary
33
-        $uri = strlen($uri) > 0 && $uri[0] === '/' ? $uri : '/' . $uri;
33
+        $uri = strlen($uri) > 0 && $uri[0] === '/' ? $uri : '/'.$uri;
34 34
         $prefixLen = strlen($uri);
35 35
         $uri = $prefixLen > 1 && substr($uri, -1) === '/' ? substr($uri, 0, $prefixLen - 1) : $uri;
36 36
 
37 37
         // feature: trailing slashes are possible when asked
38
-        $uri = $trailingSlash === true && substr($uri, -1) !== '/' ? $uri . '/' : $uri;
38
+        $uri = $trailingSlash === true && substr($uri, -1) !== '/' ? $uri.'/' : $uri;
39 39
 
40 40
         return $uri;
41 41
     }
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 
54 54
         // only one has '/'
55 55
         if ($fEndsWithSlash xor $sStartsWithSlash) {
56
-            return $uri1 . $uri2;
56
+            return $uri1.$uri2;
57 57
         }
58 58
 
59 59
         // either both have '/' nor both don't have
60 60
 
61
-        $result = $fEndsWithSlash === true ? $uri1 . substr($uri2, 1) : $uri1 . '/' . $uri2;
61
+        $result = $fEndsWithSlash === true ? $uri1.substr($uri2, 1) : $uri1.'/'.$uri2;
62 62
 
63 63
         return $result;
64 64
     }
Please login to merge, or discard this patch.
src/Routing/Traits/CallableTrait.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
      */
64 64
     protected function getCallableToCacheMessage()
65 65
     {
66
-        return 'Value either not callable or cannot be cached. ' .
66
+        return 'Value either not callable or cannot be cached. '.
67 67
             'Use callable in form of \'ClassName::methodName\' or [ClassName::class, \'methodName\'].';
68 68
     }
69 69
 }
Please login to merge, or discard this patch.