Skip to content

Commit 8a36ec5

Browse files
authored
Merge pull request #13 from moufmouf/fix_betterreflection_bc
Fixing BC break in better-reflection
2 parents b2d771e + b603cb5 commit 8a36ec5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rules/TypeHints/AbstractMissingTypeHintRule.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
use PHPStan\Analyser\Scope;
2020
use PHPStan\Broker\Broker;
2121
use PHPStan\Rules\Rule;
22+
use Roave\BetterReflection\BetterReflection;
2223
use Roave\BetterReflection\Reflection\ReflectionClass;
2324
use Roave\BetterReflection\Reflection\ReflectionFunction;
2425
use Roave\BetterReflection\Reflection\ReflectionMethod;
2526
use Roave\BetterReflection\Reflection\ReflectionParameter;
26-
use Roave\BetterReflection\Util\FindReflectionOnLine;
2727

2828
abstract class AbstractMissingTypeHintRule implements Rule
2929
{
@@ -56,7 +56,7 @@ abstract public function isReturnIgnored(Node $node): bool;
5656
public function processNode(Node $node, Scope $scope): array
5757
{
5858
// TODO: improve performance by caching better reflection results.
59-
$finder = FindReflectionOnLine::buildDefaultFinder();
59+
$finder = (new BetterReflection())->findReflectionsOnLine();
6060

6161
if ($node->getLine() < 0) {
6262
// Fixes some problems with methods in anonymous class (the line number is poorly reported).

0 commit comments

Comments
 (0)