@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // you want to allow, and if so: |
24 | 24 | header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); |
25 | 25 | header('Access-Control-Allow-Credentials: true'); |
26 | - header('Access-Control-Max-Age: 86400'); // cache for 1 day |
|
26 | + header('Access-Control-Max-Age: 86400'); // cache for 1 day |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | // Access-Control headers are received during OPTIONS requests |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | } |
90 | 90 | } |
91 | 91 | if (is_numeric($val)) { |
92 | - $int = (int)$val; |
|
93 | - $float = (float)$val; |
|
92 | + $int = (int) $val; |
|
93 | + $float = (float) $val; |
|
94 | 94 | |
95 | 95 | $val = ($int == $float) ? $int : $float; |
96 | 96 | return $val; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function get_includes() |
179 | 179 | { |
180 | - $included = array_values(array_filter(array_map(function ($arr) { |
|
180 | + $included = array_values(array_filter(array_map(function($arr) { |
|
181 | 181 | if (is_string($arr)) { |
182 | 182 | if (strpos($arr, 'vendor')) { |
183 | 183 | return ''; |
@@ -15,7 +15,9 @@ discard block |
||
15 | 15 | */ |
16 | 16 | function cors() |
17 | 17 | { |
18 | - if (!headers_sent()) return; |
|
18 | + if (!headers_sent()) { |
|
19 | + return; |
|
20 | + } |
|
19 | 21 | |
20 | 22 | // Allow from any origin |
21 | 23 | if (isset($_SERVER['HTTP_ORIGIN'])) { |
@@ -151,7 +153,9 @@ discard block |
||
151 | 153 | if (!file_exists(dirname($file))) { |
152 | 154 | mkdir(dirname($file)); |
153 | 155 | } |
154 | - if (file_exists($file)) delete($file); |
|
156 | + if (file_exists($file)) { |
|
157 | + delete($file); |
|
158 | + } |
|
155 | 159 | file_put_contents($file, $content, ($append ? FILE_APPEND : 0)); |
156 | 160 | } |
157 | 161 |