Skip to content

Commit e13a2ac

Browse files
committed
Sanity guard
1 parent 5ee375e commit e13a2ac

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Rules/PhpDoc/InvalidThrowsPhpDocValueRule.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ private function isThrowsValid(Type $phpDocThrowsType): bool
9090

9191
$toIntersectWith = [];
9292
foreach ($phpDocThrowsType->getObjectClassReflections() as $classReflection) {
93+
if (!$classReflection->isInterface()) {
94+
continue;
95+
}
9396
foreach ($classReflection->getRequireExtendsTags() as $requireExtendsTag) {
9497
$toIntersectWith[] = $requireExtendsTag->getType();
9598
}

0 commit comments

Comments
 (0)