This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
It seems like \CodexShaper\OAuth2\Serv...:getPsrServerResponse() of type object<Nyholm\Psr7\Response> is incompatible with the declared type object<CodexShaper\OAuth...sponses\ServerResponse> of property $response.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
$this->request is of type object<CodexShaper\OAuth...Requests\ServerRequest>, but the function expects a object<Psr\Http\Message\ServerRequestInterface>.
It seems like the type of the argument is not accepted by the function/method
which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this
might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
functionacceptsInteger($int){}$x='123';// string "123"// Instead ofacceptsInteger($x);// we recommend to useacceptsInteger((integer)$x);
The class CodexShaper\OAuth2\Serve...rs\OAuthServerException does not exist. Did you forget a USE statement, or did you not list all dependencies?
Scrutinizer analyzes your composer.json/composer.lock file if available to
determine the classes, and functions that are defined by your dependencies.
It seems like the listed class was neither found in your dependencies, nor was it
found in the analyzed files in your repository. If you are using some other form
of dependency management, you might want to disable this analysis.
Loading history...
64
65
// All instances of OAuthServerException can be formatted into a HTTP response
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.