| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function __invoke(string $campaignSendUuid) |
||
| 11 | { |
||
| 12 | if (! is_null($campaignSendUuid)) { |
||
| 13 | dispatch(new RegisterOpenJob($campaignSendUuid)); |
||
| 14 | } |
||
| 15 | |||
| 16 | $webBeaconContent = WebBeacon::content(); |
||
| 17 | |||
| 18 | return response($webBeaconContent)->withHeaders([ |
||
|
|
|||
| 19 | 'Content-type' => 'image/gif', |
||
| 20 | 'Content-Length' => strlen($webBeaconContent), |
||
| 21 | 'Cache-Control' => 'private, no-cache, no-cache=Set-Cookie, proxy-revalidate', |
||
| 22 | 'Expires' => 'Wed, 11 Jan 2000 12:59:00 GMT', |
||
| 23 | 'Last-Modified' => 'Wed, 11 Jan 2006 12:59:00 GMT', |
||
| 24 | 'Pragma' => 'no-cache', |
||
| 25 | ]); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |
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: