File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class UserModelGenerator extends BaseCommand
5454 /**
5555 * Actually execute the command.
5656 */
57- public function run (array $ params ): void
57+ public function run (array $ params ): int
5858 {
5959 $ this ->component = 'Model ' ;
6060 $ this ->directory = 'Models ' ;
@@ -68,12 +68,14 @@ public function run(array $params): void
6868 if (! $ this ->verifyChosenModelClassName ($ class , $ params )) {
6969 CLI ::error ('Cannot use `ShieldUserModel` as class name as this conflicts with the parent class. ' , 'light_gray ' , 'red ' );
7070
71- return ; // @TODO when CI4 is at v4.3+, change this to `return 1;` to signify failing exit
71+ return 1 ;
7272 }
7373
7474 $ params [0 ] = $ class ;
7575
76- $ this ->execute ($ params );
76+ $ this ->generateClass ($ params );
77+
78+ return 0 ;
7779 }
7880
7981 /**
You can’t perform that action at this time.
0 commit comments