@@ -3,13 +3,13 @@ |
||
3 | 3 | if (isset($_REQUEST['user']) && isset($_REQUEST['pass'])) { |
4 | 4 | $username = $_REQUEST['user']; |
5 | 5 | $password = $_REQUEST['pass']; |
6 | - Google\recaptcha::verifyCaptcha(function () use ($username, $password) { |
|
6 | + Google\recaptcha::verifyCaptcha(function() use ($username, $password) { |
|
7 | 7 | dologin($username, $password); |
8 | 8 | }); |
9 | 9 | } |
10 | 10 | |
11 | 11 | if (isset($_REQUEST['check'])) { |
12 | - user()->check_login(function ($session) { |
|
12 | + user()->check_login(function($session) { |
|
13 | 13 | e($session); |
14 | 14 | }); |
15 | 15 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | if (isset($_POST['config'])) { |
8 | 8 | unset($_POST['config']); |
9 | - array_walk_recursive($_POST, function (&$key, $value) { |
|
9 | + array_walk_recursive($_POST, function(&$key, $value) { |
|
10 | 10 | if (preg_match('/^(true|false)$/s', $key, $match)) { |
11 | 11 | if ($match[0] == 'true') { |
12 | 12 | $key = true; |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | -if (!user()->is_admin()){ |
|
2 | +if (!user()->is_admin()) { |
|
3 | 3 | safe_redirect('/'); |
4 | 4 | } |
5 | 5 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | if (isset($package['devDependencies'])) { |
23 | 23 | $packages = array_merge($package['devDependencies'], $packages); |
24 | 24 | } |
25 | -$packages = array_map(function ($pkg) { |
|
25 | +$packages = array_map(function($pkg) { |
|
26 | 26 | //var_dump($pkg); |
27 | 27 | if (false === strpos($pkg, '@types/')) { |
28 | 28 | return $pkg; |
@@ -31,19 +31,19 @@ discard block |
||
31 | 31 | } |
32 | 32 | }, array_keys($packages)); |
33 | 33 | $packages = array_values(array_filter($packages)); |
34 | -$packages = array_map(function ($pkg) { |
|
34 | +$packages = array_map(function($pkg) { |
|
35 | 35 | return "@types/$pkg"; |
36 | 36 | }, $packages); |
37 | 37 | |
38 | 38 | if (isset($package['devDependencies'])) { |
39 | - array_map(function ($types) { |
|
39 | + array_map(function($types) { |
|
40 | 40 | $package['devDependencies'][$types] = '*'; |
41 | 41 | }, $packages); |
42 | 42 | } |
43 | 43 | |
44 | 44 | \Filemanager\file::file($location, $package, true); |
45 | 45 | |
46 | -$cmd = function ($pkg) { |
|
46 | +$cmd = function($pkg) { |
|
47 | 47 | return 'cd ' . ROOT . ' && echo "Installing ' . $pkg . ' On %cd%" && '; |
48 | 48 | }; |
49 | 49 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $data = $p->fetchAll(); |
36 | 36 | $result['recordsTotal'] = count($data); |
37 | 37 | $result['recordsFiltered'] = (int) count($data); |
38 | -$data_filter = array_map(function ($map_data) { |
|
38 | +$data_filter = array_map(function($map_data) { |
|
39 | 39 | $i = 0; |
40 | 40 | foreach ($map_data as $key => $value) { |
41 | 41 | if (is_numeric($value)) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * |
140 | 140 | * @return $this |
141 | 141 | */ |
142 | - public function switch(string $dbname) |
|
142 | + public function switch (string $dbname) |
|
143 | 143 | { |
144 | 144 | $this->query('USE ' . $dbname)->exec(); |
145 | 145 | |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $this->query = ''; |
725 | 725 | if ($filter) { |
726 | 726 | if (!empty($exec) && is_array($exec)) { |
727 | - $filtered = array_map(function ($data) use ($filter) { |
|
727 | + $filtered = array_map(function($data) use ($filter) { |
|
728 | 728 | if (isset($data[$filter])) { |
729 | 729 | return $data[$filter]; |
730 | 730 | } |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | protected function checkHost($hostName) |
264 | 264 | { |
265 | 265 | return true; // Override and return false if the host is not one that you would expect. |
266 | - // Ex: You only want to accept hosts from the my-domain.com domain, |
|
267 | - // but you receive a host from malicious-site.com instead. |
|
266 | + // Ex: You only want to accept hosts from the my-domain.com domain, |
|
267 | + // but you receive a host from malicious-site.com instead. |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | protected function checkOrigin($origin) |
@@ -285,9 +285,9 @@ discard block |
||
285 | 285 | protected function processProtocol($protocol) |
286 | 286 | { |
287 | 287 | return ''; // return either "Sec-WebSocket-Protocol: SelectedProtocolFromClientList\r\n" or return an empty string. |
288 | - // The carriage return/newline combo must appear at the end of a non-empty string, and must not |
|
289 | - // appear at the beginning of the string nor in an otherwise empty string, or it will be considered part of |
|
290 | - // the response body, which will trigger an error in the client as it will not be formatted correctly. |
|
288 | + // The carriage return/newline combo must appear at the end of a non-empty string, and must not |
|
289 | + // appear at the beginning of the string nor in an otherwise empty string, or it will be considered part of |
|
290 | + // the response body, which will trigger an error in the client as it will not be formatted correctly. |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | protected function processExtensions($extensions) |
@@ -5,7 +5,7 @@ |
||
5 | 5 | $pdo->where(['simcard' => strtolower($_REQUEST['simcard'])]); |
6 | 6 | } |
7 | 7 | $row = $pdo->row_array(); |
8 | -$row = array_map(function ($db) { |
|
8 | +$row = array_map(function($db) { |
|
9 | 9 | if (isset($db['msisdn'])) { |
10 | 10 | if (strlen($db['msisdn']) <= 7) return; |
11 | 11 | return $db['msisdn']; |
@@ -7,7 +7,9 @@ |
||
7 | 7 | $row = $pdo->row_array(); |
8 | 8 | $row = array_map(function ($db) { |
9 | 9 | if (isset($db['msisdn'])) { |
10 | - if (strlen($db['msisdn']) <= 7) return; |
|
10 | + if (strlen($db['msisdn']) <= 7) { |
|
11 | + return; |
|
12 | + } |
|
11 | 13 | return $db['msisdn']; |
12 | 14 | } |
13 | 15 | }, $row); |
@@ -19,8 +19,9 @@ |
||
19 | 19 | $url .= "?s=$s&d=$d&r=$r"; |
20 | 20 | if ($img) { |
21 | 21 | $url = '<img src="' . $url . '"'; |
22 | - foreach ($atts as $key => $val) |
|
23 | - $url .= ' ' . $key . '="' . $val . '"'; |
|
22 | + foreach ($atts as $key => $val) { |
|
23 | + $url .= ' ' . $key . '="' . $val . '"'; |
|
24 | + } |
|
24 | 25 | $url .= ' />'; |
25 | 26 | } |
26 | 27 | return $url; |