Completed
Push — master ( b149f0...42b317 )
by Arnold
03:09
created
src/ErrorHandler.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     /**
73 73
      * Log an error
74 74
      * 
75
-     * @param \Error|\ErrorException $error
75
+     * @param \Error $error
76 76
      */
77 77
     protected function logError($error)
78 78
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Psr\Http\Message\ServerRequestInterface;
6 6
 use Psr\Http\Message\ResponseInterface;
7
-
8 7
 use Psr\Log\LoggerInterface;
9 8
 use Psr\Log\LoggerAwareInterface;
10 9
 use Psr\Log\LogLevel;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             return $this->logException($error);
66 66
         }
67 67
         
68
-        $message = "Unable to log a " . (is_object($error) ? get_class($error) . ' ' : '') . gettype($error);
68
+        $message = "Unable to log a ".(is_object($error) ? get_class($error).' ' : '').gettype($error);
69 69
         $this->getLogger()->log(LogLevel::WARNING, $message);
70 70
     }
71 71
     
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
         try {
140 140
             $this->error = null;
141 141
             $nextResponse = $next($request, $response);
142
-        } catch(\Error $e) {
142
+        } catch (\Error $e) {
143 143
             $this->error = $e;
144
-        } catch(\Exception $e) {
144
+        } catch (\Exception $e) {
145 145
             $this->error = $e;
146 146
         }
147 147
         
Please login to merge, or discard this patch.
tests/ErrorHandlerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function testInvokeCatchError()
87 87
     {
88 88
         if (!class_exists('Error')) {
89
-            $this->markTestSkipped(PHP_VERSION . " doesn't throw errors yet");
89
+            $this->markTestSkipped(PHP_VERSION." doesn't throw errors yet");
90 90
         }
91 91
         
92 92
         $request = $this->createMock(ServerRequestInterface::class);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         
140 140
         $exception = $this->createMock(\Exception::class);
141 141
         
142
-        $message = $this->stringStartsWith('Uncaught Exception ' . get_class($exception));
142
+        $message = $this->stringStartsWith('Uncaught Exception '.get_class($exception));
143 143
         $context = ['exception' => $exception];
144 144
         
145 145
         $logger = $this->createMock(LoggerInterface::class);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     {
206 206
         $exception = $this->createMock(\Exception::class);
207 207
         
208
-        $message = $this->stringStartsWith('Uncaught Exception ' . get_class($exception));
208
+        $message = $this->stringStartsWith('Uncaught Exception '.get_class($exception));
209 209
         $context = ['exception' => $exception];
210 210
         
211 211
         $logger = $this->createMock(LoggerInterface::class);
Please login to merge, or discard this patch.