Fix cs and phpstan issues

This commit is contained in:
Julie Lenaerts 2025-05-21 15:07:21 +02:00
parent 2febee0d7c
commit 7a7b85a689
4 changed files with 11 additions and 12 deletions

View File

@ -42,6 +42,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
use Symfony\Component\Serializer\Exception\ExceptionInterface; use Symfony\Component\Serializer\Exception\ExceptionInterface;
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
@ -62,7 +63,7 @@ final class EventController extends AbstractController
private readonly PaginatorFactory $paginator, private readonly PaginatorFactory $paginator,
private readonly Security $security, private readonly Security $security,
private readonly ManagerRegistry $managerRegistry, private readonly ManagerRegistry $managerRegistry,
private readonly SerializerInterface $serializer, private readonly Serializer $serializer,
) {} ) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])]
@ -217,9 +218,6 @@ final class EventController extends AbstractController
]); ]);
} }
/**
* First step of new Event form.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/new/pick-center', name: 'chill_event__event_new_pickcenter', options: [null])] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/new/pick-center', name: 'chill_event__event_new_pickcenter', options: [null])]
public function newPickCenterAction(): Response public function newPickCenterAction(): Response
{ {

View File

@ -276,7 +276,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/** /**
* @deprecated * @deprecated
*/ */
public function getScope(): ?Scope public function getScope(): Scope
{ {
return $this->getCircle(); return $this->getCircle();
} }
@ -390,14 +390,19 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
$this->documents = $documents; $this->documents = $documents;
} }
/**
* @deprecated
*/
public function getOrganizationCost(): string public function getOrganizationCost(): string
{ {
return $this->organizationCost; return $this->organizationCost;
} }
/**
* @deprecated
*/
public function setOrganizationCost(string $organizationCost): void public function setOrganizationCost(string $organizationCost): void
{ {
$this->organizationCost = $organizationCost; $this->organizationCost = $organizationCost;
} }
} }

View File

@ -23,9 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/ */
class PickEventTypeType extends AbstractType class PickEventTypeType extends AbstractType
{ {
public function __construct(protected TranslatableStringHelper $translatableStringHelper) public function __construct(protected TranslatableStringHelper $translatableStringHelper) {}
{
}
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {

View File

@ -17,9 +17,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
class AdminMenuBuilder implements LocalMenuBuilderInterface class AdminMenuBuilder implements LocalMenuBuilderInterface
{ {
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker) public function __construct(protected AuthorizationCheckerInterface $authorizationChecker) {}
{
}
public function buildMenu($menuId, MenuItem $menu, array $parameters): void public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{ {