@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | if ($match instanceof Success && !empty($this->definition->processors)) { |
96 | 96 | foreach ($this->definition->processors as $key => $processor) { |
97 | - $match->addResultCallback(function (&$results) use ($key, $processor, $localResults) { |
|
97 | + $match->addResultCallback(function(&$results) use ($key, $processor, $localResults) { |
|
98 | 98 | $results[$key] = $processor($localResults, $results); |
99 | 99 | }); |
100 | 100 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | // ignore |
113 | 113 | } |
114 | 114 | |
115 | - return (string)$this->parser; |
|
115 | + return (string) $this->parser; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | protected static function isRuleDefined(&$rules, $names) |
139 | 139 | { |
140 | - foreach ((array)$names as $key) { |
|
140 | + foreach ((array) $names as $key) { |
|
141 | 141 | if (!isset($rules[$key])) { |
142 | 142 | return false; |
143 | 143 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | protected static function undefineRule(&$rules, $names) |
150 | 150 | { |
151 | - foreach ((array)$names as $key) { |
|
151 | + foreach ((array) $names as $key) { |
|
152 | 152 | unset($rules[$key]); |
153 | 153 | } |
154 | 154 | } |
@@ -280,6 +280,6 @@ discard block |
||
280 | 280 | // ignore |
281 | 281 | } |
282 | 282 | |
283 | - return (string)$this->parser; |
|
283 | + return (string) $this->parser; |
|
284 | 284 | } |
285 | 285 | } |
@@ -103,21 +103,21 @@ |
||
103 | 103 | ['::', repeat(5, 5, [$this->h16, ':']), $this->ls32], |
104 | 104 | [opt($this->h16), '::', repeat(4, 4, [$this->h16, ':']), $this->ls32], |
105 | 105 | [ |
106 | - opt([repeat(0, 1, [$this->h16, ':',]), $this->h16]), |
|
106 | + opt([repeat(0, 1, [$this->h16, ':', ]), $this->h16]), |
|
107 | 107 | '::', |
108 | 108 | repeat(3, 3, [$this->h16, ':']), |
109 | 109 | $this->ls32 |
110 | 110 | ], |
111 | 111 | [ |
112 | - opt([repeat(0, 2, [$this->h16, ':',]), $this->h16]), |
|
112 | + opt([repeat(0, 2, [$this->h16, ':', ]), $this->h16]), |
|
113 | 113 | '::', |
114 | 114 | repeat(2, 2, [$this->h16, ':']), |
115 | 115 | $this->ls32 |
116 | 116 | ], |
117 | - [opt([repeat(0, 3, [$this->h16, ':',]), $this->h16]), '::', $this->h16, ':', $this->ls32], |
|
118 | - [opt([repeat(0, 4, [$this->h16, ':',]), $this->h16]), '::', $this->ls32], |
|
119 | - [opt([repeat(0, 5, [$this->h16, ':',]), $this->h16]), '::', $this->h16], |
|
120 | - [opt([repeat(0, 6, [$this->h16, ':',]), $this->h16]), '::'] |
|
117 | + [opt([repeat(0, 3, [$this->h16, ':', ]), $this->h16]), '::', $this->h16, ':', $this->ls32], |
|
118 | + [opt([repeat(0, 4, [$this->h16, ':', ]), $this->h16]), '::', $this->ls32], |
|
119 | + [opt([repeat(0, 5, [$this->h16, ':', ]), $this->h16]), '::', $this->h16], |
|
120 | + [opt([repeat(0, 6, [$this->h16, ':', ]), $this->h16]), '::'] |
|
121 | 121 | ), |
122 | 122 | 'dec_octet' => c( |
123 | 123 | ['25', range('0', '5')], // 250-255 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | protected static function getArguments($arguments, $arrayToSequence = true) |
55 | 55 | { |
56 | - return array_map(function ($argument) use ($arrayToSequence) { |
|
56 | + return array_map(function($argument) use ($arrayToSequence) { |
|
57 | 57 | return self::getArgument($argument, $arrayToSequence); |
58 | 58 | }, $arguments); |
59 | 59 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function pushCaseSensitivity($case_sensitive = true) |
10 | 10 | { |
11 | - array_push($this->case_sensitivity, (bool)$case_sensitive); |
|
11 | + array_push($this->case_sensitivity, (bool) $case_sensitive); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | public function popCaseSensitivity() |
@@ -63,11 +63,11 @@ |
||
63 | 63 | switch ($this->preference) { |
64 | 64 | default: |
65 | 65 | case self::FIRST: |
66 | - return (string)$this->parser; |
|
66 | + return (string) $this->parser; |
|
67 | 67 | case self::LONGEST: |
68 | - return 'longest-of' . (string)$this->parser; |
|
68 | + return 'longest-of' . (string) $this->parser; |
|
69 | 69 | case self::SHORTEST: |
70 | - return 'shortest-of' . (string)$this->parser; |
|
70 | + return 'shortest-of' . (string) $this->parser; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 |
@@ -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 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function __construct($sensitivity, $parser) |
35 | 35 | { |
36 | 36 | $this->parser = self::getArgument($parser); |
37 | - $this->sensitivity = (bool)$sensitivity; |
|
37 | + $this->sensitivity = (bool) $sensitivity; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | protected function parse(&$input, $offset, Context $context) |
@@ -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) { |