Skip to content

Commit

Permalink
minor #1506 [make:stimulus-controller] add typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Apr 5, 2024
1 parent 8c2451a commit ec373d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Maker/MakeStimulusController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <return> to stop adding targets)';
Expand All @@ -150,6 +151,11 @@ private function askForNextTarget(ConsoleStyle $io, array $targets, bool $isFirs
return !$targetName ? null : $targetName;
}

/**
* @param array<string, array<string, string>> $values
*
* @return array<string, string>|null
*/
private function askForNextValue(ConsoleStyle $io, array $values, bool $isFirstValue): ?array
{
$questionText = 'New value name (press <return> to stop adding values)';
Expand Down Expand Up @@ -215,6 +221,7 @@ private function printAvailableTypes(ConsoleStyle $io): void
}
}

/** @return string[] */
private function getValuesTypes(): array
{
return [
Expand Down

0 comments on commit ec373d7

Please sign in to comment.