Skip to content

Commit 7d2daec

Browse files
authored
Fix class not found (#147)
* Fix class not found * run rector
1 parent 07886b7 commit 7d2daec

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ parameters:
6161

6262
-
6363
identifier: class.notFound
64+
path: tests/Rules/Rector/PhpUpgradeImplementsMinPhpVersionInterfaceRule/PhpUpgradeImplementsMinPhpVersionInterfaceRuleTest.php
6465

6566
-
6667
identifier: phpstanApi.runtimeReflection

src/Rules/Explicit/ExplicitClassPrefixSuffixRule.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PhpParser\Node\Stmt\Trait_;
1313
use PHPStan\Analyser\Scope;
1414
use PHPStan\Rules\Rule;
15+
use PHPStan\Rules\RuleError;
1516
use PHPStan\Rules\RuleErrorBuilder;
1617
use Symplify\RuleDocGenerator\Contract\DocumentedRuleInterface;
1718
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;

src/Rules/NoReferenceRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Symplify\PHPStanRules\Rules;
66

7-
use PHPStan\Rules\RuleError;
87
use PhpParser\Node;
98
use PhpParser\Node\Arg;
109
use PhpParser\Node\ArrayItem;
@@ -16,6 +15,7 @@
1615
use PhpParser\Node\Stmt\Foreach_;
1716
use PhpParser\Node\Stmt\Function_;
1817
use PHPStan\Analyser\Scope;
18+
use PHPStan\Rules\RuleError;
1919
use PHPStan\Rules\RuleErrorBuilder;
2020
use Symplify\PHPStanRules\ParentClassMethodNodeResolver;
2121
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;

src/Rules/Rector/PhpUpgradeDowngradeRegisteredInSetRule.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use PHPStan\Node\InClassNode;
1212
use PHPStan\Reflection\ClassReflection;
1313
use PHPStan\Rules\Rule;
14+
use PHPStan\Rules\RuleErrorBuilder;
1415
use Rector\Contract\Rector\ConfigurableRectorInterface;
1516
use Rector\Contract\Rector\RectorInterface;
1617
use Rector\Set\ValueObject\DowngradeSetList;

src/Rules/Rector/RequireAssertConfigureValueObjectRectorRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use PhpParser\NodeFinder;
1313
use PHPStan\Analyser\Scope;
1414
use PHPStan\Reflection\ClassReflection;
15-
use PHPStan\Reflection\FunctionVariantWithPhpDocs;
15+
use PHPStan\Reflection\ExtendedFunctionVariant;
1616
use PHPStan\Reflection\Php\PhpMethodReflection;
1717
use PHPStan\Rules\Rule;
1818
use PHPStan\Rules\RuleErrorBuilder;
@@ -103,7 +103,7 @@ private function hasArrayObjectTypeParam(ClassMethod $classMethod, ClassReflecti
103103
}
104104

105105
foreach ($extendedMethodReflection->getVariants() as $variant) {
106-
if (! $variant instanceof FunctionVariantWithPhpDocs) {
106+
if (! $variant instanceof ExtendedFunctionVariant) {
107107
continue;
108108
}
109109

tests/Rules/Rector/PhpUpgradeDowngradeRegisteredInSetRule/PhpUpgradeDowngradeRegisteredInSetRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
namespace Symplify\PHPStanRules\Tests\Rules\Rector\PhpUpgradeDowngradeRegisteredInSetRule;
66

7-
use Rector\Contract\Rector\RectorInterface;
87
use Iterator;
98
use PHPStan\Rules\Rule;
109
use PHPStan\Testing\RuleTestCase;
1110
use PHPUnit\Framework\Attributes\DataProvider;
11+
use Rector\Contract\Rector\RectorInterface;
1212
use Symplify\PHPStanRules\Rules\Rector\PhpUpgradeDowngradeRegisteredInSetRule;
1313
use Symplify\PHPStanRules\Tests\Rules\Rector\PhpUpgradeDowngradeRegisteredInSetRule\Fixture\DowngradePhp80\SomePhpFeature2Rector;
1414
use Symplify\PHPStanRules\Tests\Rules\Rector\PhpUpgradeDowngradeRegisteredInSetRule\Fixture\Php80\SomePhpFeatureRector;

0 commit comments

Comments
 (0)