File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 5
5
namespace CodeIgniter \Shield \Commands ;
6
6
7
7
use CodeIgniter \CLI \BaseCommand as FrameworkBaseCommand ;
8
+ use CodeIgniter \CLI \Commands ;
8
9
use CodeIgniter \Shield \Commands \Utils \InputOutput ;
10
+ use Psr \Log \LoggerInterface ;
9
11
10
12
abstract class BaseCommand extends FrameworkBaseCommand
11
13
{
@@ -19,6 +21,13 @@ abstract class BaseCommand extends FrameworkBaseCommand
19
21
*/
20
22
protected $ group = 'Shield ' ;
21
23
24
+ public function __construct (LoggerInterface $ logger , Commands $ commands )
25
+ {
26
+ parent ::__construct ($ logger , $ commands );
27
+
28
+ $ this ->ensureInputOutput ();
29
+ }
30
+
22
31
/**
23
32
* Asks the user for input.
24
33
*
Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ class User extends BaseCommand
126
126
*/
127
127
public function run (array $ params ): int
128
128
{
129
- $ this ->ensureInputOutput ();
130
129
$ this ->setTables ();
131
130
$ this ->setValidationRules ();
132
131
You can’t perform that action at this time.
0 commit comments