@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | function quotedOrList(array $items): string |
27 | 27 | { |
28 | - return orList(array_map(function ($item) { |
|
28 | + return orList(array_map(function($item) { |
|
29 | 29 | return '"' . $item . '"'; |
30 | 30 | }, $items)); |
31 | 31 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $result = array_keys($optionsByDistance); |
26 | 26 | |
27 | - usort($result, function ($a, $b) use ($optionsByDistance) { |
|
27 | + usort($result, function($a, $b) use ($optionsByDistance) { |
|
28 | 28 | return $optionsByDistance[$a] - $optionsByDistance[$b]; |
29 | 29 | }); |
30 | 30 |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function getLocationsAsArray(): ?array |
152 | 152 | { |
153 | - return !empty($this->locations) ? array_map(function (SourceLocation $location) { |
|
153 | + return !empty($this->locations) ? array_map(function(SourceLocation $location) { |
|
154 | 154 | return $location->toArray(); |
155 | 155 | }, $this->locations) : null; |
156 | 156 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | protected function resolvePositions(?array $positions) |
209 | 209 | { |
210 | 210 | if (null === $positions && !empty($this->nodes)) { |
211 | - $positions = array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
211 | + $positions = array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
212 | 212 | $location = $node->getLocation(); |
213 | 213 | if (null !== $location) { |
214 | 214 | $list[] = $location->getStart(); |
@@ -234,11 +234,11 @@ discard block |
||
234 | 234 | protected function resolveLocations(?array $positions, ?Source $source) |
235 | 235 | { |
236 | 236 | if (null !== $positions && null !== $source) { |
237 | - $locations = array_map(function ($position) use ($source) { |
|
237 | + $locations = array_map(function($position) use ($source) { |
|
238 | 238 | return SourceLocation::fromSource($source, $position); |
239 | 239 | }, $positions); |
240 | 240 | } elseif (!empty($this->nodes)) { |
241 | - $locations = array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
241 | + $locations = array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
242 | 242 | $location = $node->getLocation(); |
243 | 243 | if (null !== $location) { |
244 | 244 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |
@@ -211,7 +211,7 @@ |
||
211 | 211 | function conflictReasonMessage($reason): string |
212 | 212 | { |
213 | 213 | if (\is_array($reason)) { |
214 | - return implode(' and ', array_map(function ($subreason) { |
|
214 | + return implode(' and ', array_map(function($subreason) { |
|
215 | 215 | [$fieldName, $message] = $subreason; |
216 | 216 | return sprintf('subfields "%s" conflict because %s', $fieldName, conflictReasonMessage($message)); |
217 | 217 | }, $reason)); |