It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
It seems like $response->getContent() targeting Symfony\Component\HttpFo...\Response::getContent() can also be of type false; however, Spatie\CookieConsent\Coo...losingBodyTagPosition() does only seem to accept string, did you maybe forget to handle an error condition?
Loading history...
32
}
33
34
/**
35
* @param \Illuminate\Http\Response $response
36
*
37
* @return $this
38
*/
39
protected function addCookieConsentScriptToResponse(Response $response)
It seems like $content defined by $response->getContent() on line 41 can also be of type false; however, Spatie\CookieConsent\Coo...losingBodyTagPosition() does only seem to accept string, did you maybe forget to handle an error condition?
This check looks for type mismatches where the missing type is false. This
is usually indicative of an error condtion.
This function either returns a new DateTime object or false, if there was an error.
This is a typical pattern in PHP programming to show that an error has occurred without
raising an exception. The calling code should check for this returned false
before passing on the value to another function or method that may not
be able to handle a false.
The method render does only exist in Illuminate\View\View, but not in Illuminate\Contracts\View\Factory.
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:
classA{publicfunctionfoo(){}}classBextendsA{publicfunctionbar(){}}/** * @param A|B $x */functionsomeFunction($x){$x->foo();// This call is fine as the method exists in A and B.$x->bar();// This method only exists in B and might cause an error.}