Passed
Push — master ( 80d710...7bd07e )
by 世昌
03:19
created
nebula/component/template/tag/Tag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $this->name = $name;
37 37
         $this->open = $open;
38
-        $this->close= $close;
38
+        $this->close = $close;
39 39
     }
40 40
 
41 41
     abstract public function compile(string $content):string;
Please login to merge, or discard this patch.
nebula/component/template/EchoValueTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     public function parseEchoValue($var):string
7 7
     {
8 8
         // 任意变量名: 中文点下划线英文数字
9
-        $code = preg_replace_callback('/\B[$](\?)?[:]([.\w\x{4e00}-\x{9aff}]+)(\s*)(\( ( (?>[^()]+) | (?4) )* \) )?/ux', [$this,'echoValueCallback'], $var);
9
+        $code = preg_replace_callback('/\B[$](\?)?[:]([.\w\x{4e00}-\x{9aff}]+)(\s*)(\( ( (?>[^()]+) | (?4) )* \) )?/ux', [$this, 'echoValueCallback'], $var);
10 10
         $error = preg_last_error();
11 11
         if ($error !== PREG_NO_ERROR) {
12 12
             throw new \Exception($error);
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
     
17 17
     protected function echoValueCallback($matchs)
18 18
     {
19
-        $name=$matchs[2];
20
-        if ($matchs[1]==='?') {
19
+        $name = $matchs[2];
20
+        if ($matchs[1] === '?') {
21 21
             return '$this->has("'.$name.'")';
22 22
         }
23 23
         if (isset($matchs[4])) {
24 24
             if (preg_match('/\((.+)\)/', $matchs[4], $v)) {
25 25
                 $args = trim($v[1]);
26
-                $args= strlen($args) ?','.$args:'';
26
+                $args = strlen($args) ? ','.$args : '';
27 27
                 return '$this->get("'.$name.'"'.$args.')';
28 28
             }
29 29
         }
Please login to merge, or discard this patch.