Skip to content

Commit 929f502

Browse files
patinthehatactions-user
authored andcommitted
Fix styling
1 parent d939919 commit 929f502

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/Searcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ protected function findAllReferences(array $ast): array
167167

168168
$result = [];
169169

170-
foreach($nodeMap as $parserNodeClass => $names) {
170+
foreach ($nodeMap as $parserNodeClass => $names) {
171171
$result[] = $this->findReferences($ast, $parserNodeClass, $names);
172172
}
173173

@@ -178,7 +178,7 @@ protected function findReferences(array $ast, string $class, array $names): arra
178178
{
179179
$nodes = (new NodeFinder())->findInstanceOf($ast, $class);
180180

181-
return collect($nodes)->filter(function(Node $node) use ($names) {
181+
return collect($nodes)->filter(function (Node $node) use ($names) {
182182
$name = NameResolver::resolve($node) ?? false;
183183

184184
return $name && Arr::matchesAny($name, $names, true);

src/Support/Arr.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public static function matchesAny($strings, array $values, bool $allowRegex = tr
4646
$strings = [$strings];
4747
}
4848

49-
return collect($strings)->map(function(string $str) use ($values, $allowRegex) {
49+
return collect($strings)->map(function (string $str) use ($values, $allowRegex) {
5050
return self::matches($str, $values, $allowRegex);
51-
})->filter(function($value) {
51+
})->filter(function ($value) {
5252
return $value;
5353
})->count() > 0;
5454
}

src/Support/ExpressionTransformer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Permafrost\PhpCodeSearch\Support;
44

5-
use Permafrost\PhpCodeSearch\Code\GenericCodeLocation;
65
use Permafrost\PhpCodeSearch\Results\Nodes\ArrayItemNode;
76
use Permafrost\PhpCodeSearch\Results\Nodes\ArrayNode;
87
use Permafrost\PhpCodeSearch\Results\Nodes\AssignmentNode;
@@ -36,7 +35,7 @@ class ExpressionTransformer
3635
{
3736
public static function parserNodesToResultNodes(array $nodes): array
3837
{
39-
return collect($nodes)->map(function($node) {
38+
return collect($nodes)->map(function ($node) {
4039
return static::parserNodeToResultNode($node);
4140
})->all();
4241
}
@@ -74,7 +73,7 @@ public static function parserNodeToResultNode($node)
7473
$value = $node->value;
7574
}
7675

77-
foreach($nodeMap as $parserNodeClass => $resultNodeClass) {
76+
foreach ($nodeMap as $parserNodeClass => $resultNodeClass) {
7877
if ($value instanceof $parserNodeClass) {
7978
return new $resultNodeClass($value);
8079
}

src/Support/NameResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function resolve($node)
5656

5757
protected static function propertiesExist($object, array $propertyNames): bool
5858
{
59-
foreach($propertyNames as $propertyName) {
59+
foreach ($propertyNames as $propertyName) {
6060
if (! property_exists($object, $propertyName)) {
6161
return false;
6262
}

src/Support/StatementTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function parserNodeToResultNode(Node $node)
2424

2525
public function parserNodesToResultNode(array $nodes): array
2626
{
27-
return collect($nodes)->map(function($node) {
27+
return collect($nodes)->map(function ($node) {
2828
return $this->parserNodeToResultNode($node);
2929
})->toArray();
3030
}

0 commit comments

Comments
 (0)