浏览代码

Add spaces to code O_o

Visman 4 年之前
父节点
当前提交
39a73a0410

+ 1 - 1
app/Core/DB.php

@@ -120,7 +120,7 @@ class DB extends PDO
         $map    = [];
         $map    = [];
         $query  = \preg_replace_callback(
         $query  = \preg_replace_callback(
             '%(?=[?:])(?<![\w?:])(?:::(\w+)|\?(?![?:])(?:(\w+)(?::(\w+))?)?|:(\w+))%',
             '%(?=[?:])(?<![\w?:])(?:::(\w+)|\?(?![?:])(?:(\w+)(?::(\w+))?)?|:(\w+))%',
-            function($matches) use ($params, &$idxIn, &$idxOut, &$map) {
+            function ($matches) use ($params, &$idxIn, &$idxOut, &$map) {
                 if (! empty($matches[1])) {
                 if (! empty($matches[1])) {
                     return $this->dbPrefix . $matches[1];
                     return $this->dbPrefix . $matches[1];
                 }
                 }

+ 1 - 1
app/Models/BBCodeList/Generate.php

@@ -74,7 +74,7 @@ class Generate extends Method
                              || 'text_handler' === $key
                              || 'text_handler' === $key
                         )
                         )
                     ) {
                     ) {
-                        $value = "function(\$body, \$attrs, \$parser) {\n{$value}\n{$space}}";
+                        $value = "function (\$body, \$attrs, \$parser) {\n{$value}\n{$space}}";
                     } else {
                     } else {
                         $value = '\'' . \addslashes($value) . '\'';
                         $value = '\'' . \addslashes($value) . '\'';
                     }
                     }

+ 1 - 1
app/Models/BBCodeList/Structure.php

@@ -513,7 +513,7 @@ class Structure extends ParentModel
         }
         }
 
 
         // тест на выполнение DANGER! DANGER! DANGER! O_o
         // тест на выполнение DANGER! DANGER! DANGER! O_o
-        $testCode = "\$testVar = function(\$body, \$attrs, \$parser) { {$code} };\nreturn true;";
+        $testCode = "\$testVar = function (\$body, \$attrs, \$parser) { {$code} };\nreturn true;";
 
 
         try {
         try {
             $result = @eval($testCode);
             $result = @eval($testCode);

+ 1 - 1
app/Models/Forum/Refresh.php

@@ -100,7 +100,7 @@ class Refresh extends Action
         $list[$parent]['subforums']   = $sub ?: null;
         $list[$parent]['subforums']   = $sub ?: null;
         $list[$parent]['descendants'] = $all ?: null;
         $list[$parent]['descendants'] = $all ?: null;
 
 
-        $this->list[$parent] = \array_filter($list[$parent], function($val) {
+        $this->list[$parent] = \array_filter($list[$parent], function ($val) {
             return null !== $val;
             return null !== $val;
         });
         });
 
 

+ 2 - 2
app/Models/Pages/Admin/Statistics.php

@@ -35,9 +35,9 @@ class Statistics extends Admin
             if (\preg_match('%<style[^>]*>(.*?)</style[^>]*>%is', $page, $matches)) {
             if (\preg_match('%<style[^>]*>(.*?)</style[^>]*>%is', $page, $matches)) {
                 $style = \preg_replace_callback(
                 $style = \preg_replace_callback(
                     '%(\S[^{]*)({[^}]+})%',
                     '%(\S[^{]*)({[^}]+})%',
-                    function($match) {
+                    function ($match) {
                         $result = \array_map(
                         $result = \array_map(
-                            function($val) {
+                            function ($val) {
                                 $val = \str_replace('body', '#id-phpinfo-div', $val, $count);
                                 $val = \str_replace('body', '#id-phpinfo-div', $val, $count);
 
 
                                 return $count ? $val : '#id-phpinfo-div ' . $val;
                                 return $count ? $val : '#id-phpinfo-div ' . $val;