Passed
Push — develop ( 7b3a44...b44bab )
by Pablo
02:19
created
services/services.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     'factories' => [
5
-        'ApiResponse' => function () {
5
+        'ApiResponse' => function() {
6 6
             if (class_exists('\App\Api\Factory\ApiResponse')) {
7 7
                 return new \App\Api\Factory\ApiResponse();
8 8
             } else {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     'factories' => [
5
-        'ApiResponse' => function () {
5
+        'ApiResponse' => function ()
6
+        {
6 7
             if (class_exists('\App\Api\Factory\ApiResponse')) {
7 8
                 return new \App\Api\Factory\ApiResponse();
8 9
             } else {
Please login to merge, or discard this patch.
src/Controller/DefaultController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         );
88 88
 
89 89
         if (is_null($iPage)) {
90
-            $iPage = (int) $oInput->get('page') ?: 1;
90
+            $iPage = (int) $oInput->get('page') ? : 1;
91 91
         }
92 92
 
93 93
         if (is_null($iPerPage)) {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             static::CONFIG_MODEL_NAME,
145 145
             static::CONFIG_MODEL_PROVIDER
146 146
         );
147
-        $aResults   = $oItemModel->getByIds($aIds, $aData);
147
+        $aResults = $oItemModel->getByIds($aIds, $aData);
148 148
 
149 149
         if ($oInput->get('id')) {
150 150
             $oItem = reset($aResults);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             static::CONFIG_MODEL_NAME,
176 176
             static::CONFIG_MODEL_PROVIDER
177 177
         );
178
-        $sKeywords  = $oInput->get('search') ?: $oInput->get('keywords');
178
+        $sKeywords  = $oInput->get('search') ? : $oInput->get('keywords');
179 179
         $iPage      = (int) $oInput->get('page');
180 180
 
181 181
         if (strlen($sKeywords) < static::CONFIG_MIN_SEARCH_LENGTH) {
Please login to merge, or discard this patch.
resources/console/template/controller.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,4 +42,4 @@
 block discarded – undo
42 42
     }
43 43
 }
44 44
 
45
-EOD;
45
+eod;
Please login to merge, or discard this patch.
resources/console/template/controller_crud.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,4 +25,4 @@
 block discarded – undo
25 25
     const CONFIG_MODEL_PROVIDER = '{{MODEL_PROVIDER}}';
26 26
 }
27 27
 
28
-EOD;
28
+eod;
Please login to merge, or discard this patch.
src/Controller/Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 
135 135
         if (empty($aData)) {
136 136
             $sData = stream_get_contents(fopen('php://input', 'r'));
137
-            $aData = json_decode($sData, JSON_OBJECT_AS_ARRAY) ?: [];
137
+            $aData = json_decode($sData, JSON_OBJECT_AS_ARRAY) ? : [];
138 138
         }
139 139
 
140 140
         return $aData;
Please login to merge, or discard this patch.
src/Controller/CrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@
 block discarded – undo
400 400
         $aData  = $this->getLookupData(static::ACTION_READ, $aData);
401 401
 
402 402
         //  Paging
403
-        $iPage = (int) $oInput->get(static::CONFIG_PAGE_PARAM) ?: 1;
403
+        $iPage = (int) $oInput->get(static::CONFIG_PAGE_PARAM) ? : 1;
404 404
         $iPage = $iPage < 0 ? $iPage * -1 : $iPage;
405 405
 
406 406
         //  Searching
Please login to merge, or discard this patch.
api/controllers/ApiRouter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         self::REQUEST_METHOD_DELETE,
74 74
         self::REQUEST_METHOD_OPTIONS,
75 75
     ];
76
-    const OUTPUT_FORMAT_PATTERN            = '/\.([a-z]*)$/';
76
+    const OUTPUT_FORMAT_PATTERN = '/\.([a-z]*)$/';
77 77
 
78 78
     // --------------------------------------------------------------------------
79 79
 
@@ -389,9 +389,9 @@  discard block
 block discarded – undo
389 389
             } catch (ValidationException $e) {
390 390
 
391 391
                 $aOut = [
392
-                    'status'  => $e->getCode() ?: $oHttpCodes::STATUS_BAD_REQUEST,
393
-                    'error'   => $e->getMessage() ?: 'An unkown validation error occurred',
394
-                    'details' => $e->getData() ?: [],
392
+                    'status'  => $e->getCode() ? : $oHttpCodes::STATUS_BAD_REQUEST,
393
+                    'error'   => $e->getMessage() ? : 'An unkown validation error occurred',
394
+                    'details' => $e->getData() ? : [],
395 395
                 ];
396 396
                 if (isSuperuser()) {
397 397
                     $aOut['exception'] = (object) array_filter([
@@ -406,9 +406,9 @@  discard block
 block discarded – undo
406 406
             } catch (ApiException $e) {
407 407
 
408 408
                 $aOut = [
409
-                    'status'  => $e->getCode() ?: $oHttpCodes::STATUS_INTERNAL_SERVER_ERROR,
410
-                    'error'   => $e->getMessage() ?: 'An unkown error occurred',
411
-                    'details' => $e->getData() ?: [],
409
+                    'status'  => $e->getCode() ? : $oHttpCodes::STATUS_INTERNAL_SERVER_ERROR,
410
+                    'error'   => $e->getMessage() ? : 'An unkown error occurred',
411
+                    'details' => $e->getData() ? : [],
412 412
                 ];
413 413
                 if (isSuperuser()) {
414 414
                     $aOut['exception'] = (object) array_filter([
@@ -430,8 +430,8 @@  discard block
 block discarded – undo
430 430
                     throw $e;
431 431
                 } else {
432 432
                     $aOut = [
433
-                        'status'    => $e->getCode() ?: $oHttpCodes::STATUS_INTERNAL_SERVER_ERROR,
434
-                        'error'     => $e->getMessage() ?: 'An unkown error occurred',
433
+                        'status'    => $e->getCode() ? : $oHttpCodes::STATUS_INTERNAL_SERVER_ERROR,
434
+                        'error'     => $e->getMessage() ? : 'An unkown error occurred',
435 435
                         'exception' => (object) array_filter([
436 436
                             'type' => get_class($e),
437 437
                             'file' => $e->getFile(),
Please login to merge, or discard this patch.