DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -33,31 +33,11 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class DocumentAccompanyingCourseController extends AbstractController
{
protected AuthorizationHelper $authorizationHelper;
protected EventDispatcherInterface $eventDispatcher;
protected TranslatorInterface $translator;
private AccompanyingCourseDocumentRepository $courseRepository;
private PaginatorFactory $paginatorFactory;
/**
* DocumentAccompanyingCourseController constructor.
*/
public function __construct(
TranslatorInterface $translator,
EventDispatcherInterface $eventDispatcher,
AuthorizationHelper $authorizationHelper,
PaginatorFactory $paginatorFactory,
AccompanyingCourseDocumentRepository $courseRepository
) {
$this->translator = $translator;
$this->eventDispatcher = $eventDispatcher;
$this->authorizationHelper = $authorizationHelper;
$this->paginatorFactory = $paginatorFactory;
$this->courseRepository = $courseRepository;
public function __construct(protected TranslatorInterface $translator, protected EventDispatcherInterface $eventDispatcher, protected AuthorizationHelper $authorizationHelper, private PaginatorFactory $paginatorFactory, private AccompanyingCourseDocumentRepository $courseRepository)
{
}
/**

View File

@@ -27,11 +27,8 @@ class DocumentCategoryController extends AbstractController
{
/**
* @Route("/{bundleId}/{idInsideBundle}", name="document_category_delete", methods="DELETE")
*
* @param mixed $bundleId
* @param mixed $idInsideBundle
*/
public function delete(Request $request, $bundleId, $idInsideBundle): Response
public function delete(Request $request, mixed $bundleId, mixed $idInsideBundle): Response
{
$em = $this->getDoctrine()->getManager();
$documentCategory = $em
@@ -50,11 +47,8 @@ class DocumentCategoryController extends AbstractController
/**
* @Route("/{bundleId}/{idInsideBundle}/edit", name="document_category_edit", methods="GET|POST")
*
* @param mixed $bundleId
* @param mixed $idInsideBundle
*/
public function edit(Request $request, $bundleId, $idInsideBundle): Response
public function edit(Request $request, mixed $bundleId, mixed $idInsideBundle): Response
{
$em = $this->getDoctrine()->getManager();
$documentCategory = $em
@@ -136,11 +130,8 @@ class DocumentCategoryController extends AbstractController
/**
* @Route("/{bundleId}/{idInsideBundle}", name="document_category_show", methods="GET")
*
* @param mixed $bundleId
* @param mixed $idInsideBundle
*/
public function show($bundleId, $idInsideBundle): Response
public function show(mixed $bundleId, mixed $idInsideBundle): Response
{
$em = $this->getDoctrine()->getManager();
$documentCategory = $em

View File

@@ -39,31 +39,11 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class DocumentPersonController extends AbstractController
{
protected AuthorizationHelper $authorizationHelper;
protected EventDispatcherInterface $eventDispatcher;
protected TranslatorInterface $translator;
private PaginatorFactory $paginatorFactory;
private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository;
/**
* DocumentPersonController constructor.
*/
public function __construct(
TranslatorInterface $translator,
EventDispatcherInterface $eventDispatcher,
AuthorizationHelper $authorizationHelper,
PaginatorFactory $paginatorFactory,
PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository
) {
$this->translator = $translator;
$this->eventDispatcher = $eventDispatcher;
$this->authorizationHelper = $authorizationHelper;
$this->paginatorFactory = $paginatorFactory;
$this->personDocumentACLAwareRepository = $personDocumentACLAwareRepository;
public function __construct(protected TranslatorInterface $translator, protected EventDispatcherInterface $eventDispatcher, protected AuthorizationHelper $authorizationHelper, private PaginatorFactory $paginatorFactory, private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository)
{
}
/**

View File

@@ -20,11 +20,8 @@ use Symfony\Component\Security\Core\Security;
class StoredObjectApiController
{
private Security $security;
public function __construct(Security $security)
public function __construct(private Security $security)
{
$this->security = $security;
}
/**