Skip to content

Commit 8d63969

Browse files
committed
refactor: update for CI 4.3.0
1 parent b897215 commit 8d63969

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Commands/Generators/UserModelGenerator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)