From ec373d77cc52e50e1bf1854d0e28f5a655976c16 Mon Sep 17 00:00:00 2001 From: Jesse Rushlow <40327885+jrushlow@users.noreply.github.com> Date: Fri, 5 Apr 2024 11:05:25 -0400 Subject: [PATCH] minor #1506 [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 dbb75ea36..a4ad3eb6d 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 [