Passed
Push — master ( 18d828...33264b )
by Enrico
04:07 queued 13s
created
src/Provider/Psr15/ZendPipeServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
         
59 59
         $app['uSilex.httpHandler'] = function($app) {
60 60
             $piper = $app['piper'];
61
-            foreach ($app['handler.queue'] as $middlewareService){
62
-                $piper->pipe( $app[$middlewareService]);
61
+            foreach ($app['handler.queue'] as $middlewareService) {
62
+                $piper->pipe($app[$middlewareService]);
63 63
             }
64 64
             return $piper;
65 65
         };
Please login to merge, or discard this patch.
html/example2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use uSilex\Application;
4 4
 use uSilex\Psr11Trait;
5 5
 use uSilex\Provider\Psr15\RelayServiceProvider as Psr15Provider;
6
-use uSilex\Provider\Psr7\DiactorosServiceProvider as Psr7Provider ;
6
+use uSilex\Provider\Psr7\DiactorosServiceProvider as Psr7Provider;
7 7
 use Psr\Http\Message\ResponseInterface;
8 8
 use Psr\Http\Message\ServerRequestInterface;
9 9
 use Psr\Http\Server\RequestHandlerInterface;
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 class MyMiddleware implements MiddlewareInterface {
14 14
     use Psr11Trait;
15 15
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface {
16
-        return new \Zend\Diactoros\Response\TextResponse( $this->get('message'));
16
+        return new \Zend\Diactoros\Response\TextResponse($this->get('message'));
17 17
     }
18 18
 }
19 19
 
Please login to merge, or discard this patch.
html/MyMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 class MyMiddleware implements MiddlewareInterface {
10 10
     use \uSilex\Psr11Trait;
11 11
     
12
-    public function process(ServerRequestInterface $request,RequestHandlerInterface $handler): ResponseInterface
12
+    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
13 13
     {
14 14
         // Return a text message in the container or a generic greeting...
15
-        $message = $this->has('message')?$this->get('message'):'Hi';
15
+        $message = $this->has('message') ? $this->get('message') : 'Hi';
16 16
         
17
-        return new \Zend\Diactoros\Response\TextResponse( $message);
17
+        return new \Zend\Diactoros\Response\TextResponse($message);
18 18
     }
19 19
 }
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
html/example4/StratigilityServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         };
43 43
         
44 44
         // using standard middleware as defaultt page
45
-        $app['default_page'] = function($app) { return new MyMiddleware($app);};
45
+        $app['default_page'] = function($app) { return new MyMiddleware($app); };
46 46
 
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
html/example1.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 $app = new \uSilex\Application;
7 7
 $app['uSilex.request'] = \Zend\Diactoros\ServerRequestFactory::fromGlobals();
8
-$app['uSilex.responseEmitter'] = $app->protect( function($response) {echo $response->getBody();});
8
+$app['uSilex.responseEmitter'] = $app->protect(function($response) {echo $response->getBody(); });
9 9
 $app['uSilex.httpHandler'] = function($app) {
10 10
     return new \Relay\Relay([new MyMiddleware($app)]);
11 11
 };
Please login to merge, or discard this patch.