Skip to content

Commit

Permalink
[TASK] Prefer use statements in AbstractController
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Nov 28, 2024
1 parent 5ad69c1 commit d7334f1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/Controller/Api/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,20 @@
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Validator\ConstraintViolationInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Cache\TagAwareCacheInterface;

abstract class AbstractController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
{
public function __construct(
private \Symfony\Contracts\Cache\TagAwareCacheInterface $cache,
private \App\Service\CacheService $cacheService,
private \JMS\Serializer\SerializerInterface $serializer,
private \Doctrine\Persistence\ManagerRegistry $managerRegistry,
private \App\Repository\MajorVersionRepository $majorVersions,
private \App\Repository\RequirementRepository $requirements,
private \App\Repository\ReleaseRepository $releases,
private \Symfony\Component\Validator\Validator\ValidatorInterface $validator,
private TagAwareCacheInterface $cache,
private CacheService $cacheService,
private SerializerInterface $serializer,
private ManagerRegistry $managerRegistry,
private MajorVersionRepository $majorVersions,
private RequirementRepository $requirements,
private ReleaseRepository $releases,
private ValidatorInterface $validator,
) {}

protected function getCache(): TagAwareCacheInterface
Expand Down

0 comments on commit d7334f1

Please sign in to comment.