Passed
Push — master ( 6810a7...dae2b6 )
by Martijn
53s
created
src/Parser/Structure/Except.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,6 +45,6 @@
 block discarded – undo
45 45
 
46 46
     public function __toString()
47 47
     {
48
-        return '( '.$this->parserMatch.' - '.$this->parserNot.' )';
48
+        return '( ' . $this->parserMatch . ' - ' . $this->parserNot . ' )';
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Parser/Output/ResultTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function setResult($key = null, $value = null)
34 34
     {
35
-        $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) {
35
+        $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) {
36 36
             if (is_callable($value)) {
37 37
                 $text = $value($text);
38 38
             } elseif ($value !== null) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function concatResult($key = null, $value = null)
58 58
     {
59
-        $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) {
59
+        $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) {
60 60
             if (is_callable($value)) {
61 61
                 $text = $value($text);
62 62
             } elseif ($value !== null) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             if (!isset($results[$key])) {
67 67
                 $results[$key] = (string) $text;
68 68
             } elseif (is_array($results[$key])) {
69
-                $results[$key][] = array_pop($results[$key]).$text;
69
+                $results[$key][] = array_pop($results[$key]) . $text;
70 70
             } else {
71 71
                 $results[$key] .= $text;
72 72
             }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function pushResult($key = null, $value = null)
87 87
     {
88
-        $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) {
88
+        $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) {
89 89
             if (is_callable($value)) {
90 90
                 $text = $value($text);
91 91
             } elseif ($value !== null) {
Please login to merge, or discard this patch.
src/Parser/Terminal/Set.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,6 +64,6 @@
 block discarded – undo
64 64
     {
65 65
         return ($this->include
66 66
                 ? ''
67
-                : chr(0xAC)).'( \''.implode('\' | \'', str_split($this->set)).'\' )';
67
+                : chr(0xAC)) . '( \'' . implode('\' | \'', str_split($this->set)) . '\' )';
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
src/Parser/Terminal/Regex.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
     protected function parse(&$input, $offset, Context $context)
36 36
     {
37 37
         $this->pushCaseSensitivityToContext($context);
38
-        $pattern = $this->pattern.($context->isCaseSensitive()
38
+        $pattern = $this->pattern . ($context->isCaseSensitive()
39 39
                 ? ''
40 40
                 : 'i');
41 41
         $this->popCaseSensitivityFromContext($context);
Please login to merge, or discard this patch.
src/Parser/Terminal/Text.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,6 +47,6 @@
 block discarded – undo
47 47
 
48 48
     public function __toString()
49 49
     {
50
-        return '"'.$this->text.'"';
50
+        return '"' . $this->text . '"';
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
src/Parser/Terminal/Integer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         // Build pattern
117 117
         $set0 = substr(self::$set, 0, $this->base);
118 118
         $set1 = substr(self::$set, 1, $this->base - 1);
119
-        $pattern = '/(?:0|-?['.$set1.']['.$set0.']*)/A'.($context->isCaseSensitive()
119
+        $pattern = '/(?:0|-?[' . $set1 . '][' . $set0 . ']*)/A' . ($context->isCaseSensitive()
120 120
                 ? ''
121 121
                 : 'i');
122 122
 
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
     {
145 145
         return ($this->minimum === null
146 146
                 ? '<-INF'
147
-                : ('['.$this->minimum)).','.($this->maximum === null
147
+                : ('[' . $this->minimum)) . ',' . ($this->maximum === null
148 148
                 ? 'INF>'
149
-                : ($this->maximum.']'));
149
+                : ($this->maximum . ']'));
150 150
     }
151 151
 }
Please login to merge, or discard this patch.
src/Parser/Terminal/Char.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
 
51 51
     public function __toString()
52 52
     {
53
-        return '\''.$this->character.'\'';
53
+        return '\'' . $this->character . '\'';
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/Parser/Parser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $success = new Success($length, $successes);
105 105
 
106 106
         // ResultTrait
107
-        $success->addResultCallback(function (&$results) use ($input, $offset, $length) {
107
+        $success->addResultCallback(function(&$results) use ($input, $offset, $length) {
108 108
             $text = substr($input, $offset, $length);
109 109
 
110 110
             $this->resolveResultCallbacks($results, $text);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         // AssignTrait
114 114
         $callbacks = $this->callbacks;
115
-        $success->addCustomCallback(function () use ($input, $offset, $length, $callbacks) {
115
+        $success->addCustomCallback(function() use ($input, $offset, $length, $callbacks) {
116 116
             $text = substr($input, $offset, $length);
117 117
 
118 118
             $this->resolveAssignCallbacks($text);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         });
124 124
 
125 125
         // TokenTrait
126
-        $success->setTokenCallback(function (&$children) use ($input, $offset, $length) {
126
+        $success->setTokenCallback(function(&$children) use ($input, $offset, $length) {
127 127
             return $this->resolveToken($input, $offset, $length, $children, get_class($this));
128 128
         });
129 129
 
Please login to merge, or discard this patch.