1 | <?php |
||
14 | class EmailsCleanupRecords |
||
15 | { |
||
16 | |||
17 | |||
18 | 1 | public function handle() |
|
28 | |||
29 | /** |
||
30 | * @param EmailsTrait|RecordManager $emailsManager |
||
31 | * @param $type |
||
32 | * @param $days |
||
33 | */ |
||
34 | 1 | protected function deleteByType(RecordManager $emailsManager, string $type, $days) |
|
39 | |||
40 | /** |
||
41 | * @param EmailsTrait|RecordManager $emailsManager |
||
42 | * @param $type |
||
43 | * @param $days |
||
44 | * @return Delete |
||
45 | */ |
||
46 | 1 | protected function deleteByTypeQuery($emailsManager, $type, $days) |
|
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: