ControleOnline /
api-platform-contract
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ControleOnline\Controller; |
||
| 4 | |||
| 5 | use Symfony\Component\HttpFoundation\Response; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use Doctrine\ORM\EntityManagerInterface; |
||
|
0 ignored issues
–
show
The type
Doctrine\ORM\EntityManagerInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 7 | use ControleOnline\Service\HydratorService; |
||
|
0 ignored issues
–
show
The type
ControleOnline\Service\HydratorService 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | use Exception; |
||
| 9 | use Symfony\Component\HttpFoundation\JsonResponse; |
||
|
0 ignored issues
–
show
The type
Symfony\Component\HttpFoundation\JsonResponse 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | use ControleOnline\Entity\Contract; |
||
| 11 | use ControleOnline\Service\ContractService; |
||
| 12 | |||
| 13 | class GenerateContractController |
||
| 14 | { |
||
| 15 | |||
| 16 | public function __construct( |
||
| 17 | private EntityManagerInterface $em, |
||
| 18 | private HydratorService $hydratorService, |
||
| 19 | private ContractService $contract, |
||
| 20 | ) {} |
||
| 21 | |||
| 22 | public function __invoke(Contract $data): Response |
||
| 23 | { |
||
| 24 | |||
| 25 | try { |
||
| 26 | |||
| 27 | $this->contract->genetateFromModel($data); |
||
| 28 | |||
| 29 | return new JsonResponse($this->hydratorService->data($data, 'contract:read'), Response::HTTP_OK); |
||
| 30 | } catch (Exception $e) { |
||
| 31 | return new JsonResponse($this->hydratorService->error($e)); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | } |
||
| 35 |
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