Test Setup Failed
Pull Request — master (#1)
by
unknown
01:41
created
core/Framework.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * Note: If you want to use a different PSR-7 implementation this would be
20 20
      * the proper place to replace the stock implementation of zend\diactoros.
21 21
      *
22
-     * @return Psr\Http\Message\ServerRequestInterface
22
+     * @return ServerRequestInterface
23 23
      */
24 24
     public static function requestFromGlobals(): ServerRequestInterface
25 25
     {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * class passed to it and then call __invoke() with middleware arguments.
56 56
      *
57 57
      * @param  string   $className fully qualified name of a class
58
-     * @return callable
58
+     * @return \Closure
59 59
      */
60 60
     public static function lazy(string $className): callable
61 61
     {
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * Use FastRouter\simpleDispatcher to collect the routes into a FastRoute\Dispatcher.
74 74
      *
75
-     * @param  Psr\Http\Message\ServerRequestInterface $request
75
+     * @param  ServerRequestInterface $request
76 76
      * @param  string                                  $path
77
-     * @return Psr\Http\Message\ResponseInterface
77
+     * @return ResponseInterface
78 78
      */
79 79
     public static function router(ServerRequestInterface $request, string $path = null): ResponseInterface
80 80
     {
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
     /**
90 90
      * Resolve an HTTP request match.
91 91
      *
92
-     * @param  Psr\Http\Message\ServerRequestInterface $request
92
+     * @param  ServerRequestInterface $request
93 93
      * @param  array                                   $match Route match. When using fast router will be array.
94
-     * @return Psr\Http\Message\ResponseInterface
94
+     * @return ResponseInterface
95 95
      */
96 96
     public static function resolve(ServerRequestInterface $request, array $match): ResponseInterface
97 97
     {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     /**
131 131
      * Get the rendering engine.
132 132
      *
133
-     * @return League\Plates\Engine
133
+     * @return Engine
134 134
      */
135 135
     public static function engine(): Engine
136 136
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public static function middleware(array $stack): array
46 46
     {
47
-        return array_map(function ($callable) {
47
+        return array_map(function($callable) {
48 48
             $callable = is_string($callable) ? static::lazy($callable) : $callable;
49 49
             return $callable;
50 50
         }, $stack);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public static function lazy(string $className): callable
61 61
     {
62
-        return function (ServerRequestInterface $request, RequestHandlerInterface $handler) use ($className): ResponseInterface {
62
+        return function(ServerRequestInterface $request, RequestHandlerInterface $handler) use ($className): ResponseInterface {
63 63
             $class = new $className();
64 64
             if ($class instanceof MiddlewareInterface) {
65 65
                 return $class->process($request, $handler);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public static function router(ServerRequestInterface $request, string $path = null): ResponseInterface
80 80
     {
81 81
         $path = $path ?: __DIR__ . "/../app/routes.php";
82
-        $dispatcher = \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($path) {
82
+        $dispatcher = \FastRoute\simpleDispatcher(function(RouteCollector $r) use ($path) {
83 83
             include $path;
84 84
         });
85 85
         $match = $dispatcher->dispatch($request->getMethod(), $request->getUri()->getPath());
Please login to merge, or discard this patch.
core/Response.php 2 patches
Doc Comments   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * @param  string $view name of the view to load
17 17
      * @param  array  $data data to expose to the view
18 18
      * @param  Engine $engine alternative rendering engine
19
-     * @return Psr\Http\Message\ResponseInterface
19
+     * @return ResponseInterface
20 20
      */
21 21
     public static function view(string $view, array $data, Engine $engine = null): ResponseInterface
22 22
     {
@@ -26,9 +26,8 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * Returns a response with a particular view loaded.
28 28
      *
29
-     * @param  mixed $json  JSON serializable data
30 29
      * @param  int   $flags JSON flags
31
-     * @return Psr\Http\Message\ResponseInterface
30
+     * @return ResponseInterface
32 31
      */
33 32
     public static function json($data, int $flags = 79): ResponseInterface
34 33
     {
@@ -39,7 +38,7 @@  discard block
 block discarded – undo
39 38
      * Create a new basic string response.
40 39
      *
41 40
      * @param  string $string string to respond
42
-     * @return Psr\Http\Message\ResponseInterface
41
+     * @return ResponseInterface
43 42
      */
44 43
     public static function string(string $string): ResponseInterface
45 44
     {
@@ -49,7 +48,7 @@  discard block
 block discarded – undo
49 48
     /**
50 49
      * Respond with a 400 bad request error json message.
51 50
      *
52
-     * @return Psr\Http\Message\ResponseInterface
51
+     * @return ResponseInterface
53 52
      */
54 53
     public static function error400(RequestInterface $request): ResponseInterface
55 54
     {
@@ -59,7 +58,7 @@  discard block
 block discarded – undo
59 58
     /**
60 59
      * Respond with a 403 error message.
61 60
      *
62
-     * @return Psr\Http\Message\ResponseInterface
61
+     * @return ResponseInterface
63 62
      */
64 63
     public static function error403(RequestInterface $request): ResponseInterface
65 64
     {
@@ -69,7 +68,7 @@  discard block
 block discarded – undo
69 68
     /**
70 69
      * Respond with a 404 error message.
71 70
      *
72
-     * @return Psr\Http\Message\ResponseInterface
71
+     * @return ResponseInterface
73 72
      */
74 73
     public static function error404(RequestInterface $request): ResponseInterface
75 74
     {
@@ -79,7 +78,7 @@  discard block
 block discarded – undo
79 78
     /**
80 79
      * Respond with a 405 error message.
81 80
      *
82
-     * @return Psr\Http\Message\ResponseInterface
81
+     * @return ResponseInterface
83 82
      */
84 83
     public static function error405(RequestInterface $request): ResponseInterface
85 84
     {
@@ -89,7 +88,7 @@  discard block
 block discarded – undo
89 88
     /**
90 89
      * Respond with a 429 error message.
91 90
      *
92
-     * @return Psr\Http\Message\ResponseInterface
91
+     * @return ResponseInterface
93 92
      */
94 93
     public static function error429(RequestInterface $request): ResponseInterface
95 94
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Fermi;
4 4
 
5 5
 use Psr\Http\Message\ResponseInterface;
6
-use Psr\Http\Message\ServerRequestInterface;
7 6
 use Zend\Diactoros\Response\HtmlResponse;
8 7
 use Zend\Diactoros\Response\JsonResponse;
9 8
 use Zend\Diactoros\Response\TextResponse;
Please login to merge, or discard this patch.