From 396eafee4fe41df8912b7d9e3ea6068fa00cdb7f Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 25 Apr 2026 21:04:05 +0200 Subject: [PATCH] Fix ci on PHP 7.4 --- tests/PHPStan/Analyser/nsrt/bug-9519.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/PHPStan/Analyser/nsrt/bug-9519.php b/tests/PHPStan/Analyser/nsrt/bug-9519.php index 54b6ad02bb6..7b6a380e768 100644 --- a/tests/PHPStan/Analyser/nsrt/bug-9519.php +++ b/tests/PHPStan/Analyser/nsrt/bug-9519.php @@ -7,7 +7,10 @@ class ClassA {} class ClassB {} -function instanceofVariants(mixed $obj): void +/** + * @param mixed $obj + */ +function instanceofVariants($obj): void { $isA = $obj instanceof ClassA; $isB = $obj instanceof ClassB; @@ -28,7 +31,10 @@ function instanceofVariants(mixed $obj): void */ class ClassC {} -function threeWayInstanceof(mixed $obj): void +/** + * @param mixed $obj + */ +function threeWayInstanceof($obj): void { $isA = $obj instanceof ClassA; $isB = $obj instanceof ClassB; @@ -42,8 +48,10 @@ function threeWayInstanceof(mixed $obj): void /** * Different narrowing kinds across the OR's arms — `null !==` on the left, * `instanceof` on the right. + * + * @param mixed $b */ -function mixedNarrowingKinds(?ClassA $a, mixed $b): void +function mixedNarrowingKinds(?ClassA $a, $b): void { $aNotNull = $a !== null; $bIsB = $b instanceof ClassB;