Passed
Push — master ( deb4f9...aefde3 )
by Fran
10:20
created
src/base/types/traits/JsonTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
22 22
      */
23 23
     public function json($response, $statusCode = 200)
24 24
     {
25
-        if(Config::getParam('json.encodeUTF8', false)) {
25
+        if (Config::getParam('json.encodeUTF8', false)) {
26 26
             $response = I18nHelper::utf8Encode($response);
27 27
         }
28
-        if(Config::getParam('profiling.enable')) {
29
-            if(is_array($response)) {
28
+        if (Config::getParam('profiling.enable')) {
29
+            if (is_array($response)) {
30 30
                 $response['profiling'] = Inspector::getStats();
31
-            } elseif($response instanceof JsonResponse) {
31
+            } elseif ($response instanceof JsonResponse) {
32 32
                 $response = ProfilingJsonResponse::createFromPrevious($response, Inspector::getStats());
33 33
             }
34 34
         }
35 35
         $data = json_encode($response, JSON_UNESCAPED_UNICODE | JSON_BIGINT_AS_STRING | JSON_PRESERVE_ZERO_FRACTION);
36
-        if(Config::getParam('angular.protection', false)) {
37
-            $data = ")]}',\n" . $data;
36
+        if (Config::getParam('angular.protection', false)) {
37
+            $data = ")]}',\n".$data;
38 38
         }
39 39
         $this->setStatus($statusCode);
40 40
         return $this->output($data, "application/json");
Please login to merge, or discard this patch.