@@ -31,7 +31,7 @@ |
||
31 | 31 | $this->last = $last === null |
32 | 32 | ? null |
33 | 33 | : self::parseCharacter($last); |
34 | - $this->in = (bool)$in; |
|
34 | + $this->in = (bool) $in; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | protected function parse(&$input, $offset, Context $context) |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function pushCaseSensitivity($caseSensitive = true) |
10 | 10 | { |
11 | - array_push($this->caseSensitivity, (bool)$caseSensitive); |
|
11 | + array_push($this->caseSensitivity, (bool) $caseSensitive); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | public function popCaseSensitivity() |
@@ -97,7 +97,7 @@ |
||
97 | 97 | */ |
98 | 98 | protected static function getArguments($arguments, $arrayToSequence = true) |
99 | 99 | { |
100 | - return array_map(function ($argument) use ($arrayToSequence) { |
|
100 | + return array_map(function($argument) use ($arrayToSequence) { |
|
101 | 101 | return self::getArgument($argument, $arrayToSequence); |
102 | 102 | }, $arguments); |
103 | 103 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | protected static function isRuleDefined(&$rules, $names) |
180 | 180 | { |
181 | - foreach ((array)$names as $key) { |
|
181 | + foreach ((array) $names as $key) { |
|
182 | 182 | if (!isset($rules[$key])) { |
183 | 183 | return false; |
184 | 184 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | protected static function undefineRule(&$rules, $names) |
191 | 191 | { |
192 | - foreach ((array)$names as $key) { |
|
192 | + foreach ((array) $names as $key) { |
|
193 | 193 | unset($rules[$key]); |
194 | 194 | } |
195 | 195 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | public function __toString() |
277 | 277 | { |
278 | 278 | try { |
279 | - return (string)$this->getRootParser(); |
|
279 | + return (string) $this->getRootParser(); |
|
280 | 280 | } catch (Exception $e) { |
281 | 281 | // ignore |
282 | 282 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | |
75 | 75 | $match = $this->parser->parse($input, $offset + $length + $skip, $context); |
76 | 76 | if ($match instanceof Success) { |
77 | - $length += $skip + $match->length; |
|
77 | + $length += $skip + $match->length; |
|
78 | 78 | $childMatches[] = $match; |
79 | 79 | } |
80 | 80 | } while (($match instanceof Success) |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | private function addProcessors(Success $match, $localResults) { |
120 | 120 | if (!empty($this->definition->processors)) { |
121 | 121 | $processors = $this->definition->processors; |
122 | - $match->addResultCallback(function (&$results) use ($processors, $localResults) { |
|
122 | + $match->addResultCallback(function(&$results) use ($processors, $localResults) { |
|
123 | 123 | foreach ($processors as $key => $processor) { |
124 | 124 | $results[$key] = $processor($localResults, $results); |
125 | 125 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | // ignore |
169 | 169 | } |
170 | 170 | |
171 | - return (string)$this->parser; |
|
171 | + return (string) $this->parser; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | } |