@@ -202,14 +202,14 @@ protected function disabledCommands(): array
202202 }
203203
204204 /**
205- * Will call it on action(sub-command) not found on the group.
205+ * Will call it on subcommand not found on the group.
206206 *
207- * @param string $action
207+ * @param string $command
208208 * @param array $args
209209 *
210210 * @return bool if return True, will stop goon render group help.
211211 */
212- protected function onNotFound (string $ action , array $ args ): bool
212+ protected function onNotFound (string $ command , array $ args ): bool
213213 {
214214 // TIP: you can add custom logic on sub-command not found.
215215 return false ;
@@ -310,7 +310,7 @@ public function doRun(array $args): mixed
310310 }
311311
312312 // if command not exists.
313- return $ this ->handleNotFound ($ name , $ action , $ args );
313+ return $ this ->handleNotFound ($ name , $ command , $ args );
314314 }
315315
316316 // init flags for subcommand
@@ -434,29 +434,29 @@ final public function execute(Input $input, Output $output): mixed
434434
435435 /**
436436 * @param string $group
437- * @param string $action
437+ * @param string $command
438438 * @param array $args
439439 *
440440 * @return int
441441 */
442- protected function handleNotFound (string $ group , string $ action , array $ args ): int
442+ protected function handleNotFound (string $ group , string $ command , array $ args ): int
443443 {
444444 // if user custom handle not found logic.
445- if ($ this ->onNotFound ($ action , $ args )) {
446- $ this ->debugf ('user custom handle the "%s" action "%s" not found ' , $ group , $ action );
445+ if ($ this ->onNotFound ($ command , $ args )) {
446+ $ this ->debugf ('group: %s - user custom handle the subcommand "%s" not found ' , $ group , $ command );
447447 return 0 ;
448448 }
449449
450- $ this ->debugf ('action "%s" not found on the group controller "%s" ' , $ action , $ group );
450+ $ this ->debugf ('group: %s - command "%s" is not found on the group ' , $ group , $ command );
451451
452452 // if you defined the method '$this->notFoundCallback' , will call it
453453 // if (($notFoundCallback = $this->notFoundCallback) && method_exists($this, $notFoundCallback)) {
454454 // $result = $this->{$notFoundCallback}($action);
455455 // } else {
456- $ this ->output ->liteError ("Sorry, The command ' $ action ' not exist of the group ' $ group'! " );
456+ $ this ->output ->liteError ("Sorry, The command ' $ command ' not exist of the group ' $ group'! " );
457457
458458 // find similar command names
459- $ similar = Helper::findSimilar ($ action , $ this ->getAllCommandMethods (null , true ));
459+ $ similar = Helper::findSimilar ($ command , $ this ->getAllCommandMethods (null , true ));
460460
461461 if ($ similar ) {
462462 $ this ->output ->writef ("\nMaybe what you mean is: \n <info>%s</info> " , implode (', ' , $ similar ));
0 commit comments