Skip to content

Commit a566cfd

Browse files
authored
ImmediatelyCalledCallableThrowTypeExtension: ignore implicit throw points (#163)
1 parent a47f65f commit a566cfd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Extension/ImmediatelyCalledCallableThrowTypeExtension.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ static function (): void {
147147
);
148148

149149
foreach ($result->getThrowPoints() as $throwPoint) {
150-
$throwTypes[] = $throwPoint->getType();
150+
if ($throwPoint->isExplicit()) {
151+
$throwTypes[] = $throwPoint->getType();
152+
}
151153
}
152154
}
153155

@@ -161,7 +163,9 @@ static function (): void {
161163
);
162164

163165
foreach ($result->getThrowPoints() as $throwPoint) {
164-
$throwTypes[] = $throwPoint->getType();
166+
if ($throwPoint->isExplicit()) {
167+
$throwTypes[] = $throwPoint->getType();
168+
}
165169
}
166170
}
167171

0 commit comments

Comments
 (0)