From a566cfdb4567a3627d9a85c7b0da94a3074775af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Tvrd=C3=ADk?= <_github.com@jantvrdik.com> Date: Tue, 26 Sep 2023 14:55:42 +0200 Subject: [PATCH] ImmediatelyCalledCallableThrowTypeExtension: ignore implicit throw points (#163) --- .../ImmediatelyCalledCallableThrowTypeExtension.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Extension/ImmediatelyCalledCallableThrowTypeExtension.php b/src/Extension/ImmediatelyCalledCallableThrowTypeExtension.php index 996166e..5079f06 100644 --- a/src/Extension/ImmediatelyCalledCallableThrowTypeExtension.php +++ b/src/Extension/ImmediatelyCalledCallableThrowTypeExtension.php @@ -147,7 +147,9 @@ static function (): void { ); foreach ($result->getThrowPoints() as $throwPoint) { - $throwTypes[] = $throwPoint->getType(); + if ($throwPoint->isExplicit()) { + $throwTypes[] = $throwPoint->getType(); + } } } @@ -161,7 +163,9 @@ static function (): void { ); foreach ($result->getThrowPoints() as $throwPoint) { - $throwTypes[] = $throwPoint->getType(); + if ($throwPoint->isExplicit()) { + $throwTypes[] = $throwPoint->getType(); + } } }