Completed
Push — master ( 325d09...af44b2 )
by Ma
02:19
created
src/Api/Bootstrap.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 use Api\Config\ConfigProxy;
4
-use Api\Controller\Factory as ControllerFactory;
5 4
 use Api\ErrorHandler;
6 5
 use Monolog\Logger;
7 6
 use Monolog\Handler\StreamHandler;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,5 +16,5 @@
 block discarded – undo
16 16
 $errorHandler = new ErrorHandler($logger);
17 17
 if ($environment == 'production') {
18 18
     set_error_handler([$errorHandler, "errorHandler"]);
19
-    set_exception_handler([$errorHandler,"exceptionHandler"]);
19
+    set_exception_handler([$errorHandler, "exceptionHandler"]);
20 20
 }
Please login to merge, or discard this patch.
src/Api/ErrorHandler.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
11 11
         $this->logger = $logger;
12 12
     }
13 13
 
14
+    /**
15
+     * @param string $message
16
+     */
14 17
     private function buildErrorMessage($message) {
15 18
         header('Content-Type: application/json');
16 19
         die(json_encode(['error' => $message]));
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
     public function errorHandler($level, $message, $file) {
20 20
         $this->logger->addWarning($message);
21 21
         $this->buildErrorMessage('Error occur.');
22
-     }
22
+        }
23 23
 
24 24
     public function exceptionHandler($exception) {
25 25
         $this->logger->addWarning($exception->getMessage());
26 26
         $this->buildErrorMessage('Error occur.');
27
-     }
27
+        }
28 28
 }
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
src/Api/Controller/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
                 break;
24 24
         }
25 25
 
26
-        if ( ! class_exists($className)) {
26
+        if (!class_exists($className)) {
27 27
             throw new \Exception("Strategy {$className} not found");
28 28
         }
29 29
 
Please login to merge, or discard this patch.