Skip to content

Commit 9190a86

Browse files
committed
Fix
1 parent 080b487 commit 9190a86

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

rules/Php82/Rector/Class_/ReadOnlyClassRector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ private function hasNonTypedProperty(array $properties): bool
144144

145145
private function shouldSkip(Class_ $class, Scope $scope): bool
146146
{
147+
$classReflection = $scope->getClassReflection();
148+
if (! $classReflection instanceof ClassReflection) {
149+
return true;
150+
}
151+
147152
if ($this->shouldSkipClass($class)) {
148153
return true;
149154
}

0 commit comments

Comments
 (0)