1 | <?php |
||
11 | class Mysql extends Command implements WebCommand |
||
12 | { |
||
13 | /** |
||
14 | * The console command name. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $name = 'mysql'; |
||
19 | |||
20 | /** |
||
21 | * The console command description. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $description = 'mysql console'; |
||
26 | |||
27 | /** |
||
28 | * $connection. |
||
29 | * |
||
30 | * @var \Illuminate\Database\DatabaseManager |
||
31 | */ |
||
32 | protected $databaseManager; |
||
33 | |||
34 | /** |
||
35 | * __construct. |
||
36 | * |
||
37 | * @param \Illuminate\Database\DatabaseManager $databaseManager |
||
38 | */ |
||
39 | 1 | public function __construct(DatabaseManager $databaseManager) |
|
45 | |||
46 | /** |
||
47 | * Handle the command. |
||
48 | * |
||
49 | * @throws \InvalidArgumentException |
||
50 | */ |
||
51 | 1 | public function handle() |
|
59 | |||
60 | /** |
||
61 | * castArray. |
||
62 | * |
||
63 | * @param stdClass[] $rows |
||
64 | * @return void |
||
65 | */ |
||
66 | protected function castArray($rows) |
||
72 | |||
73 | /** |
||
74 | * Get the console command options. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | 1 | protected function getOptions() |
|
84 | } |
||
85 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.