The type Symfony\Component\HttpFoundation\Response was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. excluded_paths:["lib/*"],
you can move it to the dependency path list as follows:
The type Symfony\Component\Serializer\SerializerInterface was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. excluded_paths:["lib/*"],
you can move it to the dependency path list as follows:
The call to Core\Controller\AbstractController::__construct() has too few arguments starting with jsonResponse.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
32
parent::/** @scrutinizer ignore-call */
33
__construct($serializer);
This check compares calls to functions or methods with their respective definitions.
If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.
Loading history...
33
34
$this->jsonResponse = $jsonResponse;
35
$this->readUser = $readUser;
36
}
37
38
public function __invoke(): Response
39
{
40
$users = $this->readUser->findAll();
41
42
if (empty($users)) {
43
return $this->jsonResponse->response('No data found', Response::HTTP_ACCEPTED);
$users of type User\Infrastructure\Doctrine\Entity\User[] is incompatible with the type object expected by parameter $object of Core\Controller\AbstractController::serialize().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths