@@ -49,7 +49,7 @@ |
||
49 | 49 | |
50 | 50 | public function __toString() |
51 | 51 | { |
52 | - return (string)$this->parser; |
|
52 | + return (string) $this->parser; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | } |
@@ -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) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function concatResult($key = null, $value = null) |
57 | 57 | { |
58 | - $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) { |
|
58 | + $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) { |
|
59 | 59 | if (is_callable($value)) { |
60 | 60 | $text = $value($text); |
61 | 61 | } elseif ($value !== null) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | if (!isset($results[$key])) { |
66 | - $results[$key] = (string)$text; |
|
66 | + $results[$key] = (string) $text; |
|
67 | 67 | } elseif (is_array($results[$key])) { |
68 | 68 | $results[$key][] = array_pop($results[$key]) . $text; |
69 | 69 | } else { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function pushResult($key = null, $value = null) |
85 | 85 | { |
86 | - $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) { |
|
86 | + $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) { |
|
87 | 87 | if (is_callable($value)) { |
88 | 88 | $text = $value($text); |
89 | 89 | } elseif ($value !== null) { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | public function __toString() |
52 | 52 | { |
53 | - return (string)$this->pattern; |
|
53 | + return (string) $this->pattern; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | ? null |
36 | 36 | : self::parseCharacter($last); |
37 | 37 | |
38 | - $this->in = (bool)$in; |
|
38 | + $this->in = (bool) $in; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | protected function parse(&$input, $offset, Context $context) |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function pushCaseSensitivity($caseSensitive = true) |
10 | 10 | { |
11 | - $this->caseSensitivity[] = (bool)$caseSensitive; |
|
11 | + $this->caseSensitivity[] = (bool) $caseSensitive; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | public function popCaseSensitivity() |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function __construct($sensitivity, $parser) |
33 | 33 | { |
34 | 34 | $this->parser = self::getArgument($parser); |
35 | - $this->sensitivity = (bool)$sensitivity; |
|
35 | + $this->sensitivity = (bool) $sensitivity; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | protected function parse(&$input, $offset, Context $context) |
@@ -66,7 +66,7 @@ |
||
66 | 66 | switch ($this->preference) { |
67 | 67 | default: |
68 | 68 | case self::FIRST: |
69 | - return (string)$this->parser; |
|
69 | + return (string) $this->parser; |
|
70 | 70 | case self::LONGEST: |
71 | 71 | return 'longest-of' . $this->parser; |
72 | 72 | case self::SHORTEST: |
@@ -60,7 +60,7 @@ |
||
60 | 60 | { |
61 | 61 | /* @noinspection HtmlUnknownTag */ |
62 | 62 | return $this->parser |
63 | - ? (string)$this->parser |
|
63 | + ? (string) $this->parser |
|
64 | 64 | : '<undefined>'; |
65 | 65 | } |
66 | 66 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | if (!empty($this->definition->processors)) { |
113 | 113 | $processors = $this->definition->processors; |
114 | - $match->addResultCallback(function (&$results) use ($processors, $localResults) { |
|
114 | + $match->addResultCallback(function(&$results) use ($processors, $localResults) { |
|
115 | 115 | foreach ($processors as $key => $processor) { |
116 | 116 | $results[$key] = $processor($localResults, $results); |
117 | 117 | } |
@@ -163,6 +163,6 @@ discard block |
||
163 | 163 | // ignore |
164 | 164 | } |
165 | 165 | |
166 | - return (string)$this->parser; |
|
166 | + return (string) $this->parser; |
|
167 | 167 | } |
168 | 168 | } |