Passed
Push — master ( be88e3...87c6b6 )
by Fran
04:17
created
src/base/types/traits/Api/ManagerTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
             "domain" => $this->getDomain(),
40 40
             "listLabel" => Api::API_LIST_NAME_FIELD,
41 41
             'modelId' => Api::API_MODEL_KEY_FIELD,
42
-            'formUrl' => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower('admin-api-form-' . $this->getDomain() . '-' . $this->getApi()), TRUE)),
43
-            "url" => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower($this->getDomain() . '-' . 'api-' . $this->getApi() . "-pk"), TRUE)),
42
+            'formUrl' => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower('admin-api-form-'.$this->getDomain().'-'.$this->getApi()), TRUE)),
43
+            "url" => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower($this->getDomain().'-'.'api-'.$this->getApi()."-pk"), TRUE)),
44 44
         ), [], '');
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/base/types/Controller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
     public function render($template, array $vars = array(), $cookies = array(), $domain = null)
42 42
     {
43 43
         $vars['__menu__'] = $this->getMenu();
44
-        if(Config::getParam('profiling.enable')) {
44
+        if (Config::getParam('profiling.enable')) {
45 45
             $vars['__profiling__'] = Inspector::getStats();
46 46
         }
47 47
         $domain = (null === $domain) ? $this->getDomain() : $domain;
48
-        return $this->tpl->render($domain . $template, $vars, $cookies);
48
+        return $this->tpl->render($domain.$template, $vars, $cookies);
49 49
     }
50 50
 
51 51
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $vars['__menu__'] = $this->getMenu();
78 78
         $domain = $domain ?: $this->getDomain();
79
-        return $this->tpl->dump($domain . $template, $vars);
79
+        return $this->tpl->dump($domain.$template, $vars);
80 80
     }
81 81
 
82 82
     /**
Please login to merge, or discard this patch.
src/base/Template.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $dump = '';
114 114
         try {
115 115
             $dump = $this->tpl->render($tpl, $vars);
116
-        } catch (\Exception $e) {
116
+        }catch (\Exception $e) {
117 117
             Logger::log($e->getMessage(), LOG_ERR);
118 118
         }
119 119
         return $dump;
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function regenerateTemplates()
141 141
     {
142 142
         $this->generateTemplatesCache();
143
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . "domains.json", Cache::JSON, true);
143
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR."domains.json", Cache::JSON, true);
144 144
         $translations = [];
145 145
         if (is_array($domains)) {
146 146
             $translations = $this->parsePathTranslations($domains);
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
             // force compilation
163 163
             if ($file->isFile()) {
164 164
                 try {
165
-                    $this->tpl->load(str_replace($tplDir . '/', '', $file));
166
-                } catch (\Exception $e) {
165
+                    $this->tpl->load(str_replace($tplDir.'/', '', $file));
166
+                }catch (\Exception $e) {
167 167
                     Logger::log($e->getMessage(), LOG_ERR, ['file' => $e->getFile(), 'line' => $e->getLine()]);
168 168
                 }
169 169
             }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             'getFlash' => TemplateFunctions::GET_FLASH_FUNCTION,
225 225
             'getQuery' => TemplateFunctions::GET_QUERY_FUNCTION,
226 226
         ];
227
-        foreach($functions as $name => $function) {
227
+        foreach ($functions as $name => $function) {
228 228
             $this->addTemplateFunction($name, $function);
229 229
         }
230 230
     }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     private function loadDomains()
245 245
     {
246
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', Cache::JSON, true);
246
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', Cache::JSON, true);
247 247
         if (null !== $domains) {
248 248
             foreach ($domains as $domain => $paths) {
249 249
                 $this->addPath($paths['template'], preg_replace('/(@|\/)/', '', $domain));
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     {
259 259
         $loader = new \Twig_Loader_Filesystem(GeneratorHelper::getTemplatePath());
260 260
         $this->tpl = new \Twig_Environment($loader, array(
261
-            'cache' => CACHE_DIR . DIRECTORY_SEPARATOR . 'twig',
261
+            'cache' => CACHE_DIR.DIRECTORY_SEPARATOR.'twig',
262 262
             'debug' => (bool)$this->debug,
263 263
             'auto_reload' => Config::getParam('twig.autoreload', TRUE),
264 264
         ));
Please login to merge, or discard this patch.
src/base/types/traits/Api/ApiTrait.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,9 @@
 block discarded – undo
114 114
                 try {
115 115
                     $query->filterBy($phpName, $pks[$i]);
116 116
                     $i++;
117
-                    if($i >= count($pks)) break;
117
+                    if($i >= count($pks)) {
118
+                        break;
119
+                    }
118 120
                 } catch(\Exception $e) {
119 121
                     Logger::log($e->getMessage(), LOG_DEBUG);
120 122
                 }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -96,15 +96,15 @@  discard block
 block discarded – undo
96 96
     protected function hydrateBulkRequest() {
97 97
         $class = new \ReflectionClass($this->getModelNamespace());
98 98
         $this->list = [];
99
-        foreach($this->data as $item) {
100
-            if(is_array($item)) {
101
-                if(count($this->list) < Config::getParam('api.block.limit', 1000)) {
99
+        foreach ($this->data as $item) {
100
+            if (is_array($item)) {
101
+                if (count($this->list) < Config::getParam('api.block.limit', 1000)) {
102 102
                     /** @var ActiveRecordInterface $model */
103 103
                     $model = $class->newInstance();
104 104
                     $this->hydrateModelFromRequest($model, $item);
105 105
                     $this->list[] = $model;
106
-                } else {
107
-                    Logger::log(_('Max items per bulk insert raised'), LOG_WARNING, count($this->data) . _('items'));
106
+                }else {
107
+                    Logger::log(_('Max items per bulk insert raised'), LOG_WARNING, count($this->data)._('items'));
108 108
                 }
109 109
             }
110 110
         }
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
      */
116 116
     protected function saveBulk() {
117 117
         $tablemap = $this->getTableMap();
118
-        foreach($this->list as &$model) {
118
+        foreach ($this->list as &$model) {
119 119
             $con = Propel::getWriteConnection($tablemap::DATABASE_NAME);
120 120
             try {
121 121
                 $model->save($con);
122 122
                 $con->commit();
123
-            } catch(\Exception $e) {
123
+            }catch (\Exception $e) {
124 124
                 Logger::log($e->getMessage(), LOG_ERR, $model->toArray());
125 125
                 $con->rollBack();
126 126
             }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     protected function exportList() {
134 134
         $list = [];
135 135
         /** @var ActiveRecordInterface $item */
136
-        foreach($this->list as $item) {
136
+        foreach ($this->list as $item) {
137 137
             $list[] = $item->toArray();
138 138
         }
139 139
         return $list;
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
      */
158 158
     protected function findPk(ModelCriteria $query, $pk) {
159 159
         $pks = explode(Api::API_PK_SEPARATOR, urldecode($pk));
160
-        if(count($pks) === 1 && !empty($pks[0])) {
160
+        if (count($pks) === 1 && !empty($pks[0])) {
161 161
             $query->filterByPrimaryKey($pks[0]);
162
-        } else {
162
+        }else {
163 163
             $i = 0;
164
-            foreach($this->getPkDbName() as $key => $phpName) {
164
+            foreach ($this->getPkDbName() as $key => $phpName) {
165 165
                 try {
166 166
                     $query->filterBy($phpName, $pks[$i]);
167 167
                     $i++;
168
-                    if($i >= count($pks)) break;
169
-                } catch(\Exception $e) {
168
+                    if ($i >= count($pks)) break;
169
+                }catch (\Exception $e) {
170 170
                     Logger::log($e->getMessage(), LOG_DEBUG);
171 171
                 }
172 172
             }
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
         try {
197 197
             $query = $this->prepareQuery();
198 198
             $this->model = $this->findPk($query, $pk);
199
-        } catch (\Exception $e) {
200
-            Logger::log(get_class($this) . ': ' . $e->getMessage(), LOG_ERR);
199
+        }catch (\Exception $e) {
200
+            Logger::log(get_class($this).': '.$e->getMessage(), LOG_ERR);
201 201
         }
202 202
     }
203 203
 
Please login to merge, or discard this patch.
src/base/config/ConfigForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@
 block discarded – undo
82 82
             "class" => "btn-warning md-default",
83 83
             "icon" => "fa-plus",
84 84
         ];
85
-        if(Config::getParam('admin.version', 'v1') === 'v1') {
86
-            $add["onclick"] = "javascript:addNewField(document.getElementById('" . $this->getName() . "'));";
87
-        } else {
85
+        if (Config::getParam('admin.version', 'v1') === 'v1') {
86
+            $add["onclick"] = "javascript:addNewField(document.getElementById('".$this->getName()."'));";
87
+        }else {
88 88
             $add["ng-click"] = "addNewField()";
89 89
         }
90 90
         $this->addButton('submit', _("Guardar configuración"), "submit", array(
Please login to merge, or discard this patch.
src/base/types/traits/OutputTrait.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $this->setStatusCode(Template::STATUS_OK);
121 121
                 break;
122 122
             default:
123
-                $this->setStatusCode('HTTP/1.0 ' . $status ?: 200);
123
+                $this->setStatusCode('HTTP/1.0 '.$status ?: 200);
124 124
                 break;
125 125
         }
126 126
         return $this;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         ResponseHelper::setStatusHeader($this->getStatusCode());
139 139
         ResponseHelper::setAuthHeaders($this->isPublicZone());
140 140
         ResponseHelper::setCookieHeaders($cookies);
141
-        header('Content-type: ' . $contentType);
141
+        header('Content-type: '.$contentType);
142 142
 
143 143
     }
144 144
 
@@ -154,16 +154,16 @@  discard block
 block discarded – undo
154 154
         Logger::log('Start output response');
155 155
         ob_start();
156 156
         $this->setReponseHeaders($contentType, $cookies);
157
-        header('Content-length: ' . strlen($output));
158
-        header('CRC: ' . crc32($output));
157
+        header('Content-length: '.strlen($output));
158
+        header('CRC: '.crc32($output));
159 159
 
160 160
         $needCache = Cache::needCache();
161 161
         $cache = Cache::getInstance();
162 162
         list($path, $cacheDataName) = $cache->getRequestCacheHash();
163 163
         if (false !== $needCache && $this->getStatusCode() === Template::STATUS_OK && null !== $cacheDataName) {
164 164
             Logger::log('Saving output response into cache');
165
-            $cache->storeData("json" . DIRECTORY_SEPARATOR . $path . $cacheDataName, $output);
166
-            $cache->storeData("json" . DIRECTORY_SEPARATOR . $path . $cacheDataName . ".headers", headers_list(), Cache::JSON);
165
+            $cache->storeData("json".DIRECTORY_SEPARATOR.$path.$cacheDataName, $output);
166
+            $cache->storeData("json".DIRECTORY_SEPARATOR.$path.$cacheDataName.".headers", headers_list(), Cache::JSON);
167 167
         } elseif (Request::getInstance()->getMethod() !== 'GET') {
168 168
             $cache->flushCache();
169 169
         }
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
         Logger::log('Close template render');
184 184
         $uri = Request::requestUri();
185 185
         Security::getInstance()->setSessionKey("lastRequest", array(
186
-            "url" => Request::getInstance()->getRootUrl() . $uri,
186
+            "url" => Request::getInstance()->getRootUrl().$uri,
187 187
             "ts" => microtime(true),
188 188
         ));
189 189
         Security::getInstance()->updateSession();
190
-        Logger::log('End request: ' . $uri, LOG_INFO);
190
+        Logger::log('End request: '.$uri, LOG_INFO);
191 191
         exit;
192 192
     }
193 193
 
@@ -225,17 +225,17 @@  discard block
 block discarded – undo
225 225
         /////////////////////////////////////////////////////////////
226 226
         // Date in the past sets the value to already have been expired.
227 227
         header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
228
-        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
228
+        header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
229 229
         header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
230 230
         header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
231 231
         header("Pragma: no-cache");
232 232
         header("Expires: 0");
233 233
         header('Content-Transfer-Encoding: binary');
234
-        header("Content-type: " . $content);
235
-        header("Content-length: " . strlen($data));
236
-        header('Content-Disposition: attachment; filename="' . $filename . '"');
234
+        header("Content-type: ".$content);
235
+        header("Content-length: ".strlen($data));
236
+        header('Content-Disposition: attachment; filename="'.$filename.'"');
237 237
         header("Access-Control-Expose-Headers: Filename");
238
-        header("Filename: " . $filename);
238
+        header("Filename: ".$filename);
239 239
         echo $data;
240 240
         ob_flush();
241 241
         ob_end_clean();
Please login to merge, or discard this patch.
src/base/types/helpers/Inspector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     protected static function calculateStats(array $stats, $ts, $mem = 0, $files = 0) {
29 29
         return [
30 30
             'ts' => round($stats['ts'] - $ts, 4),
31
-            'mem' => round(($stats['mem'] - $mem) / 1024 / 1024, 4),
31
+            'mem' => round(($stats['mem'] - $mem)/1024/1024, 4),
32 32
             'files' => $stats['files'] - $files,
33 33
             'name' => $stats['name'],
34 34
         ];
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $ts = defined('PSFS_START_TS') ? PSFS_START_TS : 0;
43 43
         $mem = defined('PSFS_START_MEM') ? PSFS_START_MEM : 0;
44 44
         $files = 0;
45
-        foreach(self::$profiling as $key => &$value) {
45
+        foreach (self::$profiling as $key => &$value) {
46 46
             $value = self::calculateStats($value, $ts, $mem, $files);
47 47
         }
48 48
         self::$profiling[] = self::calculateStats(self::collect('Profiling collect ends'), $ts, $mem, $files);
Please login to merge, or discard this patch.
src/base/types/helpers/RequestHelper.php 2 patches
Braces   +45 added lines, -22 removed lines patch added patch discarded remove patch
@@ -70,22 +70,28 @@  discard block
 block discarded – undo
70 70
             if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {
71 71
                 $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
72 72
                 foreach ($iplist as $ip) {
73
-                    if (self::validateIpAddress($ip))
74
-                        return $ip;
73
+                    if (self::validateIpAddress($ip)) {
74
+                                            return $ip;
75
+                    }
75 76
                 }
76 77
             } else {
77
-                if (self::validateIpAddress($_SERVER['HTTP_X_FORWARDED_FOR']))
78
-                    return $_SERVER['HTTP_X_FORWARDED_FOR'];
78
+                if (self::validateIpAddress($_SERVER['HTTP_X_FORWARDED_FOR'])) {
79
+                                    return $_SERVER['HTTP_X_FORWARDED_FOR'];
80
+                }
79 81
             }
80 82
         }
81
-        if (!empty($_SERVER['HTTP_X_FORWARDED']) && self::validateIpAddress($_SERVER['HTTP_X_FORWARDED']))
82
-            return $_SERVER['HTTP_X_FORWARDED'];
83
-        if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && self::validateIpAddress($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
84
-            return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
85
-        if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && self::validateIpAddress($_SERVER['HTTP_FORWARDED_FOR']))
86
-            return $_SERVER['HTTP_FORWARDED_FOR'];
87
-        if (!empty($_SERVER['HTTP_FORWARDED']) && self::validateIpAddress($_SERVER['HTTP_FORWARDED']))
88
-            return $_SERVER['HTTP_FORWARDED'];
83
+        if (!empty($_SERVER['HTTP_X_FORWARDED']) && self::validateIpAddress($_SERVER['HTTP_X_FORWARDED'])) {
84
+                    return $_SERVER['HTTP_X_FORWARDED'];
85
+        }
86
+        if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && self::validateIpAddress($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) {
87
+                    return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
88
+        }
89
+        if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && self::validateIpAddress($_SERVER['HTTP_FORWARDED_FOR'])) {
90
+                    return $_SERVER['HTTP_FORWARDED_FOR'];
91
+        }
92
+        if (!empty($_SERVER['HTTP_FORWARDED']) && self::validateIpAddress($_SERVER['HTTP_FORWARDED'])) {
93
+                    return $_SERVER['HTTP_FORWARDED'];
94
+        }
89 95
 
90 96
         // return unreliable ip since all else failed
91 97
         return $_SERVER['REMOTE_ADDR'];
@@ -96,8 +102,9 @@  discard block
 block discarded – undo
96 102
      * a private network range.
97 103
      */
98 104
     public static function validateIpAddress($ip) {
99
-        if (strtolower($ip) === 'unknown')
100
-            return false;
105
+        if (strtolower($ip) === 'unknown') {
106
+                    return false;
107
+        }
101 108
 
102 109
         // generate ipv4 network address
103 110
         $ip = ip2long($ip);
@@ -109,14 +116,30 @@  discard block
 block discarded – undo
109 116
             // signed numbers (ints default to signed in PHP)
110 117
             $ip = sprintf('%u', $ip);
111 118
             // do private network range checking
112
-            if ($ip >= 0 && $ip <= 50331647) return false;
113
-            if ($ip >= 167772160 && $ip <= 184549375) return false;
114
-            if ($ip >= 2130706432 && $ip <= 2147483647) return false;
115
-            if ($ip >= 2851995648 && $ip <= 2852061183) return false;
116
-            if ($ip >= 2886729728 && $ip <= 2887778303) return false;
117
-            if ($ip >= 3221225984 && $ip <= 3221226239) return false;
118
-            if ($ip >= 3232235520 && $ip <= 3232301055) return false;
119
-            if ($ip >= 4294967040) return false;
119
+            if ($ip >= 0 && $ip <= 50331647) {
120
+                return false;
121
+            }
122
+            if ($ip >= 167772160 && $ip <= 184549375) {
123
+                return false;
124
+            }
125
+            if ($ip >= 2130706432 && $ip <= 2147483647) {
126
+                return false;
127
+            }
128
+            if ($ip >= 2851995648 && $ip <= 2852061183) {
129
+                return false;
130
+            }
131
+            if ($ip >= 2886729728 && $ip <= 2887778303) {
132
+                return false;
133
+            }
134
+            if ($ip >= 3221225984 && $ip <= 3221226239) {
135
+                return false;
136
+            }
137
+            if ($ip >= 3232235520 && $ip <= 3232301055) {
138
+                return false;
139
+            }
140
+            if ($ip >= 4294967040) {
141
+                return false;
142
+            }
120 143
         }
121 144
         return true;
122 145
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
 
47 47
                     // TODO include this headers in Template class output method
48 48
                     header("Access-Control-Allow-Credentials: true");
49
-                    header("Access-Control-Allow-Origin: " . Request::getInstance()->getServer('HTTP_ORIGIN', '*'));
49
+                    header("Access-Control-Allow-Origin: ".Request::getInstance()->getServer('HTTP_ORIGIN', '*'));
50 50
                     header("Vary: Origin");
51 51
                     header("Access-Control-Allow-Methods: GET, POST, DELETE, PUT, PATCH, OPTIONS");
52
-                    header("Access-Control-Allow-Headers: " . implode(', ', self::getCorsHeaders()));
52
+                    header("Access-Control-Allow-Headers: ".implode(', ', self::getCorsHeaders()));
53 53
                 }
54 54
                 if (Request::getInstance()->getMethod() === Request::VERB_OPTIONS) {
55 55
                     Logger::log('Returning OPTIONS header confirmation for CORS pre flight requests', LOG_DEBUG);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                     if (self::validateIpAddress($ip))
79 79
                         return $ip;
80 80
                 }
81
-            } else {
81
+            }else {
82 82
                 if (self::validateIpAddress($_SERVER['HTTP_X_FORWARDED_FOR']))
83 83
                     return $_SERVER['HTTP_X_FORWARDED_FOR'];
84 84
             }
Please login to merge, or discard this patch.
src/base/types/traits/JsonTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function json($response, $statusCode = 200)
25 25
     {
26
-        if(Config::getParam('profiling.enable')) {
27
-            if(is_array($response)) {
26
+        if (Config::getParam('profiling.enable')) {
27
+            if (is_array($response)) {
28 28
                 $response['profiling'] = Inspector::getStats();
29
-            } elseif($response instanceof JsonResponse) {
29
+            } elseif ($response instanceof JsonResponse) {
30 30
                 $response = ProfilingJsonResponse::createFromPrevious($response, Inspector::getStats());
31 31
             }
32 32
         }
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
         $this->decodeJsonReponse($response);
35 35
 
36 36
         $mask = JSON_UNESCAPED_UNICODE | JSON_BIGINT_AS_STRING;
37
-        if(Config::getParam('output.json.strict_numbers')) {
37
+        if (Config::getParam('output.json.strict_numbers')) {
38 38
             $mask = JSON_UNESCAPED_UNICODE | JSON_BIGINT_AS_STRING | JSON_NUMERIC_CHECK;
39 39
         }
40 40
 
41 41
         $data = json_encode($response, $mask);
42
-        if(Config::getParam('angular.protection', false)) {
43
-            $data = ")]}',\n" . $data;
42
+        if (Config::getParam('angular.protection', false)) {
43
+            $data = ")]}',\n".$data;
44 44
         }
45 45
         $this->setStatus($statusCode);
46 46
         ResponseHelper::setDebugHeaders([]);
Please login to merge, or discard this patch.