Apply rector rules: symfony up to 54

This commit is contained in:
2024-04-04 23:30:25 +02:00
parent 1ee3b9e2f0
commit 579bd829f8
204 changed files with 974 additions and 2346 deletions

View File

@@ -20,16 +20,12 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/{_locale}/admin/document/category")
*/
#[Route(path: '/{_locale}/admin/document/category')]
class DocumentCategoryController extends AbstractController
{
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
/**
* @Route("/{bundleId}/{idInsideBundle}", name="document_category_delete", methods="DELETE")
*/
#[Route(path: '/{bundleId}/{idInsideBundle}', name: 'document_category_delete', methods: 'DELETE')]
public function delete(Request $request, mixed $bundleId, mixed $idInsideBundle): Response
{
$em = $this->managerRegistry->getManager();
@@ -47,9 +43,7 @@ class DocumentCategoryController extends AbstractController
return $this->redirectToRoute('document_category_index');
}
/**
* @Route("/{bundleId}/{idInsideBundle}/edit", name="document_category_edit", methods="GET|POST")
*/
#[Route(path: '/{bundleId}/{idInsideBundle}/edit', name: 'document_category_edit', methods: 'GET|POST')]
public function edit(Request $request, mixed $bundleId, mixed $idInsideBundle): Response
{
$em = $this->managerRegistry->getManager();
@@ -76,9 +70,8 @@ class DocumentCategoryController extends AbstractController
]);
}
/**
* @Route("/", name="document_category_index", methods="GET")
* @Route("/", name="chill_docstore_category_admin", methods="GET") */
#[Route(path: '/', name: 'document_category_index', methods: 'GET')]
#[Route(path: '/', name: 'chill_docstore_category_admin', methods: 'GET')]
public function index(): Response
{
$em = $this->managerRegistry->getManager();
@@ -92,9 +85,7 @@ class DocumentCategoryController extends AbstractController
);
}
/**
* @Route("/new", name="document_category_new", methods="GET|POST")
*/
#[Route(path: '/new', name: 'document_category_new', methods: 'GET|POST')]
public function new(Request $request): Response
{
$em = $this->managerRegistry->getManager();
@@ -130,9 +121,7 @@ class DocumentCategoryController extends AbstractController
]);
}
/**
* @Route("/{bundleId}/{idInsideBundle}", name="document_category_show", methods="GET")
*/
#[Route(path: '/{bundleId}/{idInsideBundle}', name: 'document_category_show', methods: 'GET')]
public function show(mixed $bundleId, mixed $idInsideBundle): Response
{
$em = $this->managerRegistry->getManager();