Passed
Push — master ( 810673...436c58 )
by Anton
02:43
created
src/Http/Middleware/ErrorHandlerMiddleware.php 1 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.