1 | <?php |
||
8 | class MeetingsList extends Command |
||
9 | { |
||
10 | /** |
||
11 | * The name and signature of the console command. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $signature = 'meetings:list {companyId?}'; |
||
16 | |||
17 | /** |
||
18 | * The console command description. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $description = 'List of all meetings of a company that must be taken'; |
||
23 | |||
24 | /** |
||
25 | * Create a new command instance. |
||
26 | * |
||
27 | */ |
||
28 | 15 | public function __construct() |
|
32 | |||
33 | /** |
||
34 | * Execute the console command. |
||
35 | * |
||
36 | * @return mixed |
||
37 | */ |
||
38 | public function handle() |
||
47 | |||
48 | private static function withFilter() |
||
58 | } |
||
59 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: