1 | <?php |
||
9 | class Feed |
||
10 | { |
||
11 | public function getFeedResponse(array $feedConfiguration) : HttpResponse |
||
12 | { |
||
13 | $feedContent = $this->getFeedContent($feedConfiguration); |
||
14 | |||
15 | return response($feedContent, 200, ['Content-Type' => 'application/atom+xml; chartset=UTF-8']); |
||
16 | } |
||
17 | |||
18 | public function getFeedContent(array $feedConfiguration) : string |
||
37 | |||
38 | protected function getLastUpdatedDate(Collection $items, string $format) : string |
||
48 | } |
||
49 |
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: