@@ -53,7 +53,7 @@ |
||
53 | 53 | if ($code === 92) { |
54 | 54 | // \ |
55 | 55 | $value .= sliceString($body, $chunkStart, $pos - 1); |
56 | - $code = charCodeAt($body, $pos); |
|
56 | + $code = charCodeAt($body, $pos); |
|
57 | 57 | |
58 | 58 | switch ($code) { |
59 | 59 | case 34: |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function getLocationsAsArray(): ?array |
154 | 154 | { |
155 | - return !empty($this->locations) ? \array_map(function (SourceLocation $location) { |
|
155 | + return !empty($this->locations) ? \array_map(function(SourceLocation $location) { |
|
156 | 156 | return $location->toArray(); |
157 | 157 | }, $this->locations) : null; |
158 | 158 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ? (!empty($nodes) ? $nodes : []) |
192 | 192 | : (null !== $nodes ? [$nodes] : []); |
193 | 193 | |
194 | - $this->nodes = \array_filter($nodes, function ($node) { |
|
194 | + $this->nodes = \array_filter($nodes, function($node) { |
|
195 | 195 | return null !== $node; |
196 | 196 | }); |
197 | 197 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | protected function resolvePositions(?array $positions) |
223 | 223 | { |
224 | 224 | if (null === $positions && !empty($this->nodes)) { |
225 | - $positions = \array_reduce($this->nodes, function (array $list, ?NodeInterface $node) { |
|
225 | + $positions = \array_reduce($this->nodes, function(array $list, ?NodeInterface $node) { |
|
226 | 226 | if (null !== $node) { |
227 | 227 | $location = $node->getLocation(); |
228 | 228 | if (null !== $location) { |
@@ -250,11 +250,11 @@ discard block |
||
250 | 250 | protected function resolveLocations(?array $positions, ?Source $source) |
251 | 251 | { |
252 | 252 | if (null !== $positions && null !== $source) { |
253 | - $locations = \array_map(function ($position) use ($source) { |
|
253 | + $locations = \array_map(function($position) use ($source) { |
|
254 | 254 | return SourceLocation::fromSource($source, $position); |
255 | 255 | }, $positions); |
256 | 256 | } elseif (!empty($this->nodes)) { |
257 | - $locations = \array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
257 | + $locations = \array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
258 | 258 | $location = $node->getLocation(); |
259 | 259 | if (null !== $location) { |
260 | 260 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | \preg_match_all("/\r\n|[\n\r]/", \substr($source->getBody(), 0, $position), $matches, PREG_OFFSET_CAPTURE); |
62 | 62 | |
63 | 63 | foreach ($matches[0] as $index => $match) { |
64 | - $line += 1; |
|
64 | + $line += 1; |
|
65 | 65 | $column = $position + 1 - ($match[1] + \strlen($match[0])); |
66 | 66 | } |
67 | 67 |