@@ -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 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public function assignTo(&$variable) |
38 | 38 | { |
39 | - $this->assignCallbacks[] = function ($text) use (&$variable) { |
|
39 | + $this->assignCallbacks[] = function($text) use (&$variable) { |
|
40 | 40 | $variable = $text; |
41 | 41 | }; |
42 | 42 |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $success = new Success($length, $successes); |
99 | 99 | |
100 | 100 | // ResultTrait |
101 | - $success->addResultCallback(function (&$results) use ($input, $offset, $length) { |
|
101 | + $success->addResultCallback(function(&$results) use ($input, $offset, $length) { |
|
102 | 102 | $text = substr($input, $offset, $length); |
103 | 103 | |
104 | 104 | $this->resolveResultCallbacks($results, $text); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | // AssignTrait |
108 | 108 | $callbacks = $this->callbacks; |
109 | - $success->addCustomCallback(function () use ($input, $offset, $length, $callbacks) { |
|
109 | + $success->addCustomCallback(function() use ($input, $offset, $length, $callbacks) { |
|
110 | 110 | $text = substr($input, $offset, $length); |
111 | 111 | |
112 | 112 | $this->resolveAssignCallbacks($text); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | }); |
118 | 118 | |
119 | 119 | // TokenTrait |
120 | - $success->setTokenCallback(function (&$children) use ($input, $offset, $length) { |
|
120 | + $success->setTokenCallback(function(&$children) use ($input, $offset, $length) { |
|
121 | 121 | return $this->resolveToken($input, $offset, $length, $children, get_class($this)); |
122 | 122 | }); |
123 | 123 |
@@ -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 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function setResult($key = null, $value = null) |
36 | 36 | { |
37 | - $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) { |
|
37 | + $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) { |
|
38 | 38 | if (is_callable($value)) { |
39 | 39 | $text = $value($text); |
40 | 40 | } elseif ($value !== null) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function concatResult($key = null, $value = null) |
60 | 60 | { |
61 | - $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) { |
|
61 | + $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) { |
|
62 | 62 | if (is_callable($value)) { |
63 | 63 | $text = $value($text); |
64 | 64 | } elseif ($value !== null) { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function pushResult($key = null, $value = null) |
89 | 89 | { |
90 | - $this->resultCallbacks[] = function (&$results, $text) use (&$key, &$value) { |
|
90 | + $this->resultCallbacks[] = function(&$results, $text) use (&$key, &$value) { |
|
91 | 91 | if (is_callable($value)) { |
92 | 92 | $text = $value($text); |
93 | 93 | } elseif ($value !== null) { |
@@ -123,7 +123,7 @@ |
||
123 | 123 | { |
124 | 124 | if (!empty($this->definition->processors)) { |
125 | 125 | $processors = $this->definition->processors; |
126 | - $match->addResultCallback(function (&$results) use ($processors, $localResults) { |
|
126 | + $match->addResultCallback(function(&$results) use ($processors, $localResults) { |
|
127 | 127 | foreach ($processors as $key => $processor) { |
128 | 128 | $results[$key] = $processor($localResults, $results); |
129 | 129 | } |