Skip to content

Commit

Permalink
[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 5bf40ae commit 8dc5e3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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,10 @@ private function askForNextTarget(ConsoleStyle $io, array $targets, bool $isFirs
return !$targetName ? null : $targetName;
}

/**
* @param array<string, array<string, string>> $values
* @return null|array<string, string>
*/
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 +220,7 @@ private function printAvailableTypes(ConsoleStyle $io): void
}
}

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

0 comments on commit 8dc5e3d

Please sign in to comment.