From ac20c417eb96cb0462125a4b130a8f1a9cbbde44 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 16 Oct 2026 23:19:49 +0200 Subject: [PATCH] Declare array shapes on fixed array returns --- src/PhpParser/NodeFactory/SplitConfigClosureFactory.php | 3 +-- .../ServiceContainerTestByPackageSubscriber.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/PhpParser/NodeFactory/SplitConfigClosureFactory.php b/src/PhpParser/NodeFactory/SplitConfigClosureFactory.php index ace771720..36d6b3d91 100644 --- a/src/PhpParser/NodeFactory/SplitConfigClosureFactory.php +++ b/src/PhpParser/NodeFactory/SplitConfigClosureFactory.php @@ -11,7 +11,6 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Param; use PhpParser\Node\Scalar\Int_; -use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Declare_; use PhpParser\Node\Stmt\DeclareDeclare; use PhpParser\Node\Stmt\Expression; @@ -22,7 +21,7 @@ final class SplitConfigClosureFactory { /** - * @return Stmt[] + * @return array{Declare_, Nop, Return_} */ public function createStmts(MethodCall $extensionMethodCall): array { diff --git a/src/SmokeTestgen/TestByPackageSubscriber/ServiceContainerTestByPackageSubscriber.php b/src/SmokeTestgen/TestByPackageSubscriber/ServiceContainerTestByPackageSubscriber.php index f712a3520..b138f2e4c 100644 --- a/src/SmokeTestgen/TestByPackageSubscriber/ServiceContainerTestByPackageSubscriber.php +++ b/src/SmokeTestgen/TestByPackageSubscriber/ServiceContainerTestByPackageSubscriber.php @@ -9,7 +9,7 @@ final class ServiceContainerTestByPackageSubscriber implements TestByPackageSubscriberInterface { /** - * @return string[] + * @return array{string, string} */ public function getPackageNames(): array {