From 3f92c0b61546f0cc4df51d35713f711d07344b5a Mon Sep 17 00:00:00 2001 From: Jesse Rushlow Date: Fri, 5 Apr 2024 10:36:50 -0400 Subject: [PATCH] [make:stimulus-controller] add typehints --- src/Maker/MakeStimulusController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Maker/MakeStimulusController.php b/src/Maker/MakeStimulusController.php index 4dd23e65e..60b10fb1c 100644 --- a/src/Maker/MakeStimulusController.php +++ b/src/Maker/MakeStimulusController.php @@ -131,6 +131,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen ]); } + /** @param string[] $targets */ private function askForNextTarget(ConsoleStyle $io, array $targets, bool $isFirstTarget): ?string { $questionText = 'New target name (press to stop adding targets)'; @@ -150,6 +151,11 @@ private function askForNextTarget(ConsoleStyle $io, array $targets, bool $isFirs return !$targetName ? null : $targetName; } + /** + * @param array> $values + * + * @return array|null + */ private function askForNextValue(ConsoleStyle $io, array $values, bool $isFirstValue): ?array { $questionText = 'New value name (press to stop adding values)'; @@ -215,6 +221,7 @@ private function printAvailableTypes(ConsoleStyle $io): void } } + /** @return string[] */ private function getValuesTypes(): array { return [