|
2 | 2 |
|
3 | 3 | namespace Permafrost\PhpCodeSearch; |
4 | 4 |
|
5 | | -use Permafrost\PhpCodeSearch\Results\SearchError; |
6 | 5 | use Permafrost\PhpCodeSearch\Results\FileSearchResults; |
| 6 | +use Permafrost\PhpCodeSearch\Results\SearchError; |
7 | 7 | use Permafrost\PhpCodeSearch\Support\File; |
8 | 8 | use Permafrost\PhpCodeSearch\Visitors\FunctionCallVisitor; |
9 | 9 | use PhpParser\Error; |
|
16 | 16 |
|
17 | 17 | class Searcher |
18 | 18 | { |
19 | | - /** @var ParserFactory $parser */ |
| 19 | + /** @var ParserFactory */ |
20 | 20 | protected $parser; |
21 | 21 |
|
22 | 22 | /** @var array */ |
@@ -58,7 +58,7 @@ public function static(array $names): self |
58 | 58 |
|
59 | 59 | public function assignments(array $varNames): self |
60 | 60 | { |
61 | | - $varNames = array_map(function($item) { |
| 61 | + $varNames = array_map(function ($item) { |
62 | 62 | return ltrim($item, '$'); |
63 | 63 | }, $varNames); |
64 | 64 |
|
@@ -138,7 +138,7 @@ protected function findCalls(array $ast, string $class, ?string $nodeNameProp, a |
138 | 138 | return $nodes; |
139 | 139 | } |
140 | 140 |
|
141 | | - return array_filter($nodes, function(Node $node) use ($names, $nodeNameProp) { |
| 141 | + return array_filter($nodes, function (Node $node) use ($names, $nodeNameProp) { |
142 | 142 | // if (! isset($node->{$nodeNameProp}->parts)) { |
143 | 143 | // return false; |
144 | 144 | // } |
@@ -183,7 +183,7 @@ protected function sortNodesByLineNumber(...$items) |
183 | 183 | { |
184 | 184 | $result = array_merge(...$items); |
185 | 185 |
|
186 | | - usort($result, function($a, $b) { |
| 186 | + usort($result, function ($a, $b) { |
187 | 187 | if ($a->name->getAttribute('startLine') > $b->name->getAttribute('startLine')) { |
188 | 188 | return 1; |
189 | 189 | } |
|
0 commit comments