Completed
Push — master ( ef610a...dc0762 )
by Gabor
24:45
created
src/WebHemi/Application/Web/WebApplication.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 use WebHemi\Application\ApplicationInterface;
20 20
 use WebHemi\Config\ConfigInterface;
21 21
 use WebHemi\Middleware\DispatcherMiddleware;
22
-use WebHemi\Middleware\MiddlewareInvokerInterface;
23 22
 use WebHemi\Middleware\FinalMiddleware;
24 23
 use WebHemi\Middleware\MiddlewareInterface;
25 24
 use WebHemi\Middleware\Pipeline\MiddlewarePipelineInterface;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
             ->setServiceArgument(HttpAdapterInterface::class, $this->environmentData['COOKIE'])
120 120
             ->setServiceArgument(HttpAdapterInterface::class, $this->environmentData['FILES']);
121 121
 
122
-        $moduleConfig = $this->config->get('modules/' . $this->selectedModule, ConfigInterface::CONFIG_AS_OBJECT);
122
+        $moduleConfig = $this->config->get('modules/'.$this->selectedModule, ConfigInterface::CONFIG_AS_OBJECT);
123 123
         $this->container
124 124
             ->setServiceArgument(FinalMiddleware::class, $moduleConfig);
125 125
 
Please login to merge, or discard this patch.
src/WebHemi/Middleware/RoutingMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      *
42 42
      * @return ResponseInterface
43 43
      */
44
-    public function __invoke(ServerRequestInterface &$request, ResponseInterface $response)
44
+    public function __invoke(ServerRequestInterface&$request, ResponseInterface $response)
45 45
     {
46 46
         $routeResult = $this->routerAdapter->match($request);
47 47
 
Please login to merge, or discard this patch.
src/WebHemi/Middleware/Action/FakeAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
 class FakeAction implements MiddlewareInterface
19 19
 {
20
-    public function __invoke(ServerRequestInterface &$request, ResponseInterface $response)
20
+    public function __invoke(ServerRequestInterface&$request, ResponseInterface $response)
21 21
     {
22 22
         $request = $request->withAttribute('template', 'no')
23 23
             ->withAttribute('data', ['<h2>This is the test action, buddy!</h2>']);
Please login to merge, or discard this patch.
src/WebHemi/Middleware/DispatcherMiddleware.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
      * @return ResponseInterface
44 44
      */
45
-    public function __invoke(ServerRequestInterface &$request, ResponseInterface $response)
45
+    public function __invoke(ServerRequestInterface&$request, ResponseInterface $response)
46 46
     {
47 47
         $template = $request->getAttribute('template');
48 48
         $data = $request->getAttribute('data');
Please login to merge, or discard this patch.
src/WebHemi/Middleware/FinalMiddleware.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return ResponseInterface
49 49
      */
50
-    public function __invoke(ServerRequestInterface &$request, ResponseInterface $response)
50
+    public function __invoke(ServerRequestInterface&$request, ResponseInterface $response)
51 51
     {
52 52
         if (headers_sent()) {
53 53
             throw new RuntimeException('Unable to emit response; headers already sent');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         // Handle errors here.
59 59
         if ($response->getStatusCode() !== 200) {
60
-            $errorTemplate = $this->templateConfig->get('template_map/error' . $response->getStatusCode());
60
+            $errorTemplate = $this->templateConfig->get('template_map/error'.$response->getStatusCode());
61 61
             $error = $request->getAttribute('exception');
62 62
             $content = $this->templateRenderer->render($errorTemplate, ['exception' => $error]);
63 63
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             'HTTP/%s %d%s',
70 70
             $response->getProtocolVersion(),
71 71
             $response->getStatusCode(),
72
-            ($reasonPhrase ? ' ' . $reasonPhrase : '')
72
+            ($reasonPhrase ? ' '.$reasonPhrase : '')
73 73
         ));
74 74
 
75 75
         foreach ($response->getHeaders() as $headerName => $values) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     private function injectContentLength(ResponseInterface $response)
100 100
     {
101
-        if (!$response->hasHeader('Content-Length')&& !is_null($response->getBody()->getSize())) {
101
+        if (!$response->hasHeader('Content-Length') && !is_null($response->getBody()->getSize())) {
102 102
             $response = $response->withHeader('Content-Length', (string) $response->getBody()->getSize());
103 103
         }
104 104
 
Please login to merge, or discard this patch.
src/WebHemi/Middleware/MiddlewareInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,5 +29,5 @@
 block discarded – undo
29 29
      *
30 30
      * @return ResponseInterface
31 31
      */
32
-    public function __invoke(ServerRequestInterface &$request, ResponseInterface $response);
32
+    public function __invoke(ServerRequestInterface&$request, ResponseInterface $response);
33 33
 }
Please login to merge, or discard this patch.
src/WebHemi/Adapter/Renderer/FakeRenderer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@
 block discarded – undo
33 33
         if (isset($parameters['exception'])) {
34 34
             /** @var \Exception $exp */
35 35
             $exp = $parameters['exception'];
36
-            $output .= '<p>' . $exp->getMessage() . '</p>';
37
-            $output .= '<p>' . $exp->getFile() . ' at line ' . $exp->getLine() . '</p>';
38
-            $output .= '<pre>' . $exp->getTraceAsString() . '</pre>';
36
+            $output .= '<p>'.$exp->getMessage().'</p>';
37
+            $output .= '<p>'.$exp->getFile().' at line '.$exp->getLine().'</p>';
38
+            $output .= '<pre>'.$exp->getTraceAsString().'</pre>';
39 39
         } else {
40 40
             $output .= $parameters[0];
41 41
         }
42 42
 
43
-        $output .= '<p>' . $template . '</p>';
43
+        $output .= '<p>'.$template.'</p>';
44 44
 
45 45
         // The ugliest shit ever. But that is how they made it... :/
46 46
         return \GuzzleHttp\Psr7\stream_for($output);
Please login to merge, or discard this patch.