@@ -88,7 +88,7 @@ protected function runCommand(): void
8888 // Stelle sicher, dass publishable Resources registriert sind (auch im Web-Kontext)
8989 // Dies löst das Problem, dass Spatie Package Tools nur registriert, wenn runningInConsole() true ist
9090 WebCommandRunner::ensurePublishableResourcesRegistered ();
91-
91+
9292 $ this ->responseStore ->resetCounter ();
9393
9494 foreach ($ this ->answers as $ promptId => $ answer ) {
@@ -129,7 +129,7 @@ protected function runCommand(): void
129129 // Kumulativer Output: Füge neuen Output zum bestehenden hinzu
130130 if (! empty ($ newOutput )) {
131131 if (! empty ($ this ->output )) {
132- $ this ->output .= "\n" . $ newOutput ;
132+ $ this ->output .= "\n" . $ newOutput ;
133133 } else {
134134 $ this ->output = $ newOutput ;
135135 }
@@ -143,14 +143,14 @@ protected function runCommand(): void
143143 // Kumulativer Output: Füge neuen Output zum bestehenden hinzu
144144 if (! empty ($ newOutput )) {
145145 if (! empty ($ this ->output )) {
146- $ this ->output .= "\n" . $ newOutput ;
146+ $ this ->output .= "\n" . $ newOutput ;
147147 } else {
148148 $ this ->output = $ newOutput ;
149149 }
150150 }
151151 // Zeige kumulativen Output während Prompts für Debugging
152152 $ this ->currentStepOutput = $ this ->output ?? '' ;
153-
153+
154154 $ prompt = $ e ->getPrompt ();
155155 $ this ->currentPrompt = $ prompt ;
156156 $ this ->executionStep ++;
@@ -177,7 +177,7 @@ protected function runCommand(): void
177177 // Kumulativer Output auch bei Exceptions
178178 if (! empty ($ newOutput )) {
179179 if (! empty ($ this ->output )) {
180- $ this ->output .= "\n" . $ newOutput ;
180+ $ this ->output .= "\n" . $ newOutput ;
181181 } else {
182182 $ this ->output = $ newOutput ;
183183 }
@@ -288,14 +288,14 @@ public function submitPrompt(): void
288288 // Capture Filament validation errors
289289 $ errors = $ e ->errors ();
290290 $ this ->validationErrors = [];
291-
291+
292292 // Get errors for current prompt field
293293 if (isset ($ errors [$ promptId ])) {
294- $ this ->validationErrors = is_array ($ errors [$ promptId ])
295- ? $ errors [$ promptId ]
294+ $ this ->validationErrors = is_array ($ errors [$ promptId ])
295+ ? $ errors [$ promptId ]
296296 : [$ errors [$ promptId ]];
297297 }
298-
298+
299299 // If no specific field errors, get all errors
300300 if (empty ($ this ->validationErrors )) {
301301 foreach ($ errors as $ fieldErrors ) {
@@ -306,7 +306,7 @@ public function submitPrompt(): void
306306 }
307307 }
308308 }
309-
309+
310310 return ;
311311 }
312312 }
@@ -315,16 +315,19 @@ public function submitPrompt(): void
315315 if ($ this ->currentPrompt ['method ' ] === 'confirm ' ) {
316316 if ($ answer === null ) {
317317 $ this ->validatePromptAnswer ($ promptId , null , $ this ->currentPrompt );
318+
318319 return ;
319320 }
320321 } elseif ($ this ->currentPrompt ['method ' ] === 'select ' ) {
321322 // Für Select: Prüfe ob leer oder null
322323 if ($ answer === null || $ answer === '' || $ answer === '0 ' ) {
323324 $ this ->validatePromptAnswer ($ promptId , $ answer , $ this ->currentPrompt );
325+
324326 return ;
325327 }
326328 } elseif ($ answer === null || $ answer === '' ) {
327329 $ this ->validatePromptAnswer ($ promptId , '' , $ this ->currentPrompt );
330+
328331 return ;
329332 }
330333
@@ -456,7 +459,7 @@ protected function validatePromptAnswer(string $promptId, mixed $answer, array $
456459 $ messages ["{$ promptId }.required " ] = 'Bitte mindestens eine Option wählen. ' ;
457460 $ messages ["{$ promptId }.min " ] = 'Bitte mindestens eine Option wählen. ' ;
458461 }
459-
462+
460463 // Freundlichere Meldungen speziell für Select
461464 if ($ method === 'select ' ) {
462465 $ messages ["{$ promptId }.required " ] = 'Bitte wählen Sie eine Option aus. ' ;
@@ -582,16 +585,16 @@ protected function createFieldFromPrompt(string $promptId, string $method, array
582585 if ($ required ) {
583586 $ rules [] = 'required ' ;
584587 }
585-
588+
586589 // Add method-specific rules
587590 if ($ method === 'select ' && $ required && ! empty ($ options )) {
588591 $ rules [] = 'in: ' .implode (', ' , array_keys ($ options ));
589592 }
590-
593+
591594 if ($ method === 'confirm ' ) {
592595 $ rules [] = 'boolean ' ;
593596 }
594-
597+
595598 $ pushRules ($ rules , $ validate );
596599
597600 // Kein automatisches Default für Select - Validation wird verwendet
0 commit comments