We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb0c6c5 commit f270792Copy full SHA for f270792
rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php
@@ -15,6 +15,7 @@
15
use PhpParser\Node\Name;
16
use PhpParser\Node\Scalar\Int_;
17
use PHPStan\Type\ObjectType;
18
+use PHPStan\Type\ThisType;
19
use PHPStan\Type\Type;
20
use Rector\Rector\AbstractRector;
21
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@@ -144,6 +145,10 @@ private function refactorPropertyFetch(PropertyFetch $propertyFetch): ?Ternary
144
145
146
private function skipPhpParserInternalToken(Type $type): bool
147
{
148
+ if ($type instanceof ThisType) {
149
+ $type = $type->getStaticObjectType();
150
+ }
151
+
152
if ($type instanceof ObjectType) {
153
return $type->isInstanceOf('PhpParser\Internal\TokenPolyfill')
154
->yes();
0 commit comments