From e5ccb51c7c8aa20d2198f1f3a72eec51773d56e2 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 4 Oct 2025 05:57:17 +0700 Subject: [PATCH] Update rules @return to use specific NodeVisitor:: constant per latest PHPStan --- .../Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php | 1 + .../Rector/FuncCall/DowngradeIteratorCountToArrayRector.php | 1 + 2 files changed, 2 insertions(+) diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php index 5ed535e3..3ea2ac45 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php @@ -89,6 +89,7 @@ public function getNodeTypes(): array /** * @param If_|Ternary|FuncCall $node + * @return null|NodeVisitor::DONT_TRAVERSE_CHILDREN|Node */ public function refactor(Node $node): null|int|Node { diff --git a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php index 61cd95ea..86be906f 100644 --- a/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php +++ b/rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php @@ -68,6 +68,7 @@ function test(array|Traversable $data) { /** * @param Ternary|FuncCall $node + * @return null|FuncCall|NodeVisitor::DONT_TRAVERSE_CHILDREN */ public function refactor(Node $node): null|FuncCall|int {