1 | <?php |
||
17 | class DataExtension extends BaseDataExtension |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @param FieldList $fields |
||
22 | */ |
||
23 | public function updateCMSFields(FieldList $fields): void |
||
40 | |||
41 | /** |
||
42 | * @return string|null |
||
43 | */ |
||
44 | public function getSavedJobDataPreview(): ?string |
||
48 | |||
49 | /** |
||
50 | * @return string|null |
||
51 | */ |
||
52 | public function getMessagesRaw(): ?string |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getImplementationSummary(): string |
||
70 | } |
||
71 |
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: