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 080b487 commit 9190a86Copy full SHA for 9190a86
1 file changed
rules/Php82/Rector/Class_/ReadOnlyClassRector.php
@@ -144,6 +144,11 @@ private function hasNonTypedProperty(array $properties): bool
144
145
private function shouldSkip(Class_ $class, Scope $scope): bool
146
{
147
+ $classReflection = $scope->getClassReflection();
148
+ if (! $classReflection instanceof ClassReflection) {
149
+ return true;
150
+ }
151
+
152
if ($this->shouldSkipClass($class)) {
153
return true;
154
}
0 commit comments