| 1 | <?php |
||
| 17 | class AffiliateTracking |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @param $request |
||
| 21 | * @param Closure $next |
||
| 22 | * |
||
| 23 | * @return $this|mixed |
||
| 24 | */ |
||
| 25 | public function handle($request, Closure $next) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param $ref |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | public function hasStoreAffiliateId($ref) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param $ref |
||
| 59 | * @param int $lifetime |
||
| 60 | * |
||
| 61 | * @return \Illuminate\Cookie\CookieJar|\Symfony\Component\HttpFoundation\Cookie |
||
| 62 | */ |
||
| 63 | protected function storeAffiliateId($ref, $lifetime = 0) |
||
| 73 | } |
||
| 74 |
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: