This repository was archived by the owner on Mar 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ protected function configure(): void
33
33
{
34
34
$ this ->addArgument ('task ' , InputArgument::IS_ARRAY | InputArgument::OPTIONAL , 'The name of the automated task ' );
35
35
$ this ->addOption ('dirty ' , mode: InputOption::VALUE_NONE , description: 'Scan only dirty files ' );
36
- $ this ->addOption ('path ' , mode: InputOption::VALUE_REQUIRED | InputArgument::OPTIONAL , description: 'The paths to scan ' );
36
+ $ this ->addOption ('path ' , mode: InputOption::VALUE_REQUIRED | InputArgument::OPTIONAL | InputOption:: VALUE_IS_ARRAY , description: 'The paths to scan ' );
37
37
}
38
38
39
39
protected function execute (InputInterface $ input , OutputInterface $ output ): int
40
40
{
41
- $ tasks = empty ($ input ->getArgument ('task ' )) ? Configuration::get ('tasks ' ) : $ input ->getArgument ('task ' );
41
+ $ tasks = empty ($ input ->getArgument ('task ' )) ? Configuration::get ('tasks ' , [] ) : $ input ->getArgument ('task ' );
42
42
43
43
foreach ($ tasks as $ task ) {
44
44
$ result = ($ this ->createTask ($ this ->taskRegistry ($ task ), $ input ))->perform ();
@@ -61,7 +61,7 @@ private function createTask(string $name, InputInterface $input): Task
61
61
$ task = new $ name ;
62
62
63
63
if (in_array (FindsFiles::class, class_uses_recursive ($ task ))) {
64
- if ($ input ->getOption ('path ' )) {
64
+ if (! empty ( $ input ->getOption ('path ' ) )) {
65
65
$ task ->setPaths ($ input ->getOption ('path ' ));
66
66
}
67
67
You can’t perform that action at this time.
0 commit comments