2121 */
2222class CleanCommand extends AbstractCommand
2323{
24+ /** @var array<string, string|null>|null */
2425 private static ?array $ cachedEnv = null ;
26+ /** @var array<string, string|null> */
2527 private array $ originalEnv = [];
28+ /** @var array<string, string|null> */
2629 private array $ secureEnvStorage = [];
2730
2831 /**
@@ -96,7 +99,7 @@ protected function executeCommand(InputInterface $input, OutputInterface $output
9699 *
97100 * @param InputInterface $input
98101 * @param OutputInterface $output
99- * @return array|null Array of theme codes or null to exit
102+ * @return array<string> |null Array of theme codes or null to exit
100103 */
101104 private function resolveThemeCodes (InputInterface $ input , OutputInterface $ output ): ?array
102105 {
@@ -117,7 +120,7 @@ private function resolveThemeCodes(InputInterface $input, OutputInterface $outpu
117120 /**
118121 * Get all theme codes
119122 *
120- * @return array|null
123+ * @return array<string> |null
121124 */
122125 private function getAllThemeCodes (): ?array
123126 {
@@ -138,7 +141,7 @@ private function getAllThemeCodes(): ?array
138141 * Select themes interactively
139142 *
140143 * @param OutputInterface $output
141- * @return array|null
144+ * @return array<string> |null
142145 */
143146 private function selectThemesInteractively (OutputInterface $ output ): ?array
144147 {
@@ -156,7 +159,7 @@ private function selectThemesInteractively(OutputInterface $output): ?array
156159 /**
157160 * Display available themes for non-interactive environments
158161 *
159- * @param array $themes
162+ * @param array<mixed> $themes
160163 * @return void
161164 */
162165 private function displayAvailableThemes (array $ themes ): void
@@ -181,9 +184,9 @@ private function displayAvailableThemes(array $themes): void
181184 /**
182185 * Prompt user to select themes
183186 *
184- * @param array $options
185- * @param array $themes
186- * @return array|null
187+ * @param array<string> $options
188+ * @param array<mixed> $themes
189+ * @return array<string> |null
187190 */
188191 private function promptForThemes (array $ options , array $ themes ): ?array
189192 {
@@ -219,10 +222,10 @@ private function promptForThemes(array $options, array $themes): ?array
219222 /**
220223 * Process cleaning for all selected themes
221224 *
222- * @param array $themeCodes
225+ * @param array<string> $themeCodes
223226 * @param bool $dryRun
224227 * @param OutputInterface $output
225- * @return array [totalCleaned, failedThemes]
228+ * @return array<int, mixed> [totalCleaned, failedThemes]
226229 */
227230 private function processThemes (array $ themeCodes , bool $ dryRun , OutputInterface $ output ): array
228231 {
@@ -257,7 +260,7 @@ private function processThemes(array $themeCodes, bool $dryRun, OutputInterface
257260 * Validate theme exists
258261 *
259262 * @param string $themeName
260- * @param array & $failedThemes
263+ * @param array<string> $failedThemes
261264 * @param OutputInterface $output
262265 * @return string|null Theme code if valid or corrected, null if invalid
263266 */
@@ -364,9 +367,9 @@ private function displayThemeResult(string $themeName, int $cleaned, bool $dryRu
364367 /**
365368 * Display summary of cleaning operation
366369 *
367- * @param array $themeCodes
370+ * @param array<string> $themeCodes
368371 * @param int $totalCleaned
369- * @param array $failedThemes
372+ * @param array<string> $failedThemes
370373 * @param bool $dryRun
371374 * @return void
372375 */
@@ -411,7 +414,7 @@ private function displaySingleThemeSummary(string $themeCode, int $totalCleaned,
411414 *
412415 * @param int $totalThemes
413416 * @param int $totalCleaned
414- * @param array $failedThemes
417+ * @param array<string> $failedThemes
415418 * @param bool $dryRun
416419 * @return void
417420 */
@@ -543,6 +546,8 @@ private function getSecureEnvironmentValue(string $name): ?string
543546
544547 /**
545548 * Cache and filter environment variables safely
549+ *
550+ * @return array<string, string|null>
546551 */
547552 private function getCachedEnvironmentVariables (): array
548553 {
0 commit comments