Passed
Push — master ( 810673...436c58 )
by Anton
02:43
created
src/Bootloader/Http/SessionBootloader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             'handler'  => new Autowire(
67 67
                 FileHandler::class,
68 68
                 [
69
-                    'directory' => $directories->get('runtime') . 'session',
69
+                    'directory' => $directories->get('runtime').'session',
70 70
                     'lifetime'  => 86400
71 71
                 ]
72 72
             )
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     private function session(ServerRequestInterface $request): SessionInterface
86 86
     {
87 87
         $session = $request->getAttribute(SessionMiddleware::ATTRIBUTE, null);
88
-        if ($session === null) {
88
+        if ($session === null){
89 89
             throw new ScopeException('Unable to resolve Session, invalid request scope');
90 90
         }
91 91
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,8 @@
 block discarded – undo
85 85
     private function session(ServerRequestInterface $request): SessionInterface
86 86
     {
87 87
         $session = $request->getAttribute(SessionMiddleware::ATTRIBUTE, null);
88
-        if ($session === null) {
88
+        if ($session === null)
89
+        {
89 90
             throw new ScopeException('Unable to resolve Session, invalid request scope');
90 91
         }
91 92
 
Please login to merge, or discard this patch.
src/Http/Middleware/ErrorHandlerMiddleware.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         bool $suppressErrors,
46 46
         RendererInterface $renderer,
47 47
         SnapshotterInterface $snapshots = null
48
-    ) {
48
+    ){
49 49
         $this->suppressErrors = $suppressErrors;
50 50
         $this->renderer = $renderer;
51 51
         $this->snapshots = $snapshots;
@@ -58,20 +58,20 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function process(Request $request, Handler $handler): Response
60 60
     {
61
-        try {
61
+        try{
62 62
             return $handler->handle($request);
63
-        } catch (ClientException | RouterException $e) {
64
-            if ($e instanceof ClientException) {
63
+        }catch (ClientException | RouterException $e){
64
+            if ($e instanceof ClientException){
65 65
                 $code = $e->getCode();
66
-            } else {
66
+            }else{
67 67
                 $code = 404;
68 68
             }
69
-        } catch (\Throwable $e) {
70
-            if (!$this->suppressErrors) {
69
+        }catch (\Throwable $e){
70
+            if (!$this->suppressErrors){
71 71
                 throw $e;
72 72
             }
73 73
 
74
-            if ($this->snapshots !== null) {
74
+            if ($this->snapshots !== null){
75 75
                 $this->snapshots->register($e);
76 76
             }
77 77
 
Please login to merge, or discard this patch.
Braces   +17 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,20 +58,30 @@
 block discarded – undo
58 58
      */
59 59
     public function process(Request $request, Handler $handler): Response
60 60
     {
61
-        try {
61
+        try
62
+        {
62 63
             return $handler->handle($request);
63
-        } catch (ClientException | RouterException $e) {
64
-            if ($e instanceof ClientException) {
64
+        }
65
+        catch (ClientException | RouterException $e)
66
+        {
67
+            if ($e instanceof ClientException)
68
+            {
65 69
                 $code = $e->getCode();
66
-            } else {
70
+            }
71
+            else
72
+            {
67 73
                 $code = 404;
68 74
             }
69
-        } catch (\Throwable $e) {
70
-            if (!$this->suppressErrors) {
75
+        }
76
+        catch (\Throwable $e)
77
+        {
78
+            if (!$this->suppressErrors)
79
+            {
71 80
                 throw $e;
72 81
             }
73 82
 
74
-            if ($this->snapshots !== null) {
83
+            if ($this->snapshots !== null)
84
+            {
75 85
                 $this->snapshots->register($e);
76 86
             }
77 87
 
Please login to merge, or discard this patch.