@@ -34,6 +34,6 @@ |
||
34 | 34 | |
35 | 35 | public function __toString() |
36 | 36 | { |
37 | - return '!'.$this->parser; |
|
37 | + return '!' . $this->parser; |
|
38 | 38 | } |
39 | 39 | } |
@@ -45,6 +45,6 @@ |
||
45 | 45 | |
46 | 46 | public function __toString() |
47 | 47 | { |
48 | - return '( '.implode(' + ', $this->parsers).' )'; |
|
48 | + return '( ' . implode(' + ', $this->parsers) . ' )'; |
|
49 | 49 | } |
50 | 50 | } |
@@ -238,6 +238,6 @@ |
||
238 | 238 | : |
239 | 239 | ''); |
240 | 240 | |
241 | - return $prefix.'( '.implode(' | ', $this->parsers).' )'; |
|
241 | + return $prefix . '( ' . implode(' | ', $this->parsers) . ' )'; |
|
242 | 242 | } |
243 | 243 | } |
@@ -45,6 +45,6 @@ |
||
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 | } |
@@ -32,7 +32,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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) { |
@@ -64,6 +64,6 @@ |
||
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 | } |
@@ -35,7 +35,7 @@ |
||
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); |
@@ -47,6 +47,6 @@ |
||
47 | 47 | |
48 | 48 | public function __toString() |
49 | 49 | { |
50 | - return '"'.$this->text.'"'; |
|
50 | + return '"' . $this->text . '"'; |
|
51 | 51 | } |
52 | 52 | } |
@@ -116,7 +116,7 @@ discard block |
||
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 |
||
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 | } |