Completed
Push — dev ( 1f2c5e...7b9d4f )
by Marcin
13s queued 11s
created
src/ResponseBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         $data = (new Converter())->convert($data);
240 240
         if ($data !== null && !is_object($data)) {
241 241
             // ensure we get object in final JSON structure in data node
242
-            $data = (object)$data;
242
+            $data = (object) $data;
243 243
         }
244 244
 
245 245
         // get human readable message for API code or use message string (if given instead of API code)
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
         if ($debug_data !== null) {
263 263
             $debug_key = Config::get(ResponseBuilder::CONF_KEY_DEBUG_DEBUG_KEY, ResponseBuilder::KEY_DEBUG);
264
-            $response[ $debug_key ] = $debug_data;
264
+            $response[$debug_key] = $debug_data;
265 265
         }
266 266
 
267 267
         return $response;
Please login to merge, or discard this patch.
src/ExceptionHandlerHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
             // Check if we have any exception configuration for this particular HTTP status code.
45 45
             // This confing entry is guaranted to exist (at least 'default'). Enforced by tests.
46 46
             $http_code = $ex->getStatusCode();
47
-            $ex_cfg = $cfg[ HttpException::class ][ $http_code ] ?? null;
48
-            $ex_cfg = $ex_cfg ?? $cfg[ HttpException::class ]['default'];
47
+            $ex_cfg = $cfg[HttpException::class][$http_code] ?? null;
48
+            $ex_cfg = $ex_cfg ?? $cfg[HttpException::class]['default'];
49 49
             $result = self::processException($ex, /** @scrutinizer ignore-type */ $ex_cfg, $http_code);
50 50
         } elseif ($ex instanceof ValidationException) {
51 51
             // This entry is guaranted to exist. Enforced by tests.
52 52
             $http_code = HttpResponse::HTTP_UNPROCESSABLE_ENTITY;
53
-            $result = self::processException($ex, $cfg[ HttpException::class ][ $http_code ], $http_code);
53
+            $result = self::processException($ex, $cfg[HttpException::class][$http_code], $http_code);
54 54
         }
55 55
 
56 56
         if ($result === null) {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         // This entry is guaranted to exist. Enforced by tests.
147 147
         $http_code = HttpResponse::HTTP_UNAUTHORIZED;
148
-        $cfg = static::getExceptionHandlerConfig()['map'][ HttpException::class ][ $http_code ];
148
+        $cfg = static::getExceptionHandlerConfig()['map'][HttpException::class][$http_code];
149 149
 
150 150
         return static::processException($exception, $cfg, $http_code);
151 151
     }
Please login to merge, or discard this patch.