1 | <?php |
||
10 | class MakeCommand extends ComponentCommand |
||
11 | { |
||
12 | /** |
||
13 | * The console command name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name = 'component:make'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Generate new component.'; |
||
25 | |||
26 | /** |
||
27 | * Execute the console command. |
||
28 | * |
||
29 | * @return mixed |
||
30 | */ |
||
31 | public function fire() |
||
46 | |||
47 | /** |
||
48 | * Get the console command arguments. |
||
49 | * |
||
50 | * @return array |
||
51 | */ |
||
52 | protected function getArguments() |
||
58 | |||
59 | protected function getOptions() |
||
66 | } |
||
67 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.