mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
php cs fixes after updating php cs fixer
This commit is contained in:
@@ -92,7 +92,7 @@ class EventController extends AbstractController
|
||||
public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$event = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->findOneBy([
|
||||
$event = $em->getRepository(Event::class)->findOneBy([
|
||||
'id' => $event_id,
|
||||
]);
|
||||
|
||||
@@ -146,7 +146,7 @@ class EventController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event_id);
|
||||
$entity = $em->getRepository(Event::class)->find($event_id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Event entity.');
|
||||
@@ -173,7 +173,7 @@ class EventController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
|
||||
$person = $em->getRepository(Person::class)->find($person_id);
|
||||
|
||||
if (null === $person) {
|
||||
throw $this->createNotFoundException('Person not found');
|
||||
@@ -187,11 +187,11 @@ class EventController extends AbstractController
|
||||
$person->getCenter()
|
||||
);
|
||||
|
||||
$total = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->countByPerson($person_id);
|
||||
$total = $em->getRepository(Participation::class)->countByPerson($person_id);
|
||||
|
||||
$paginator = $this->paginator->create($total);
|
||||
|
||||
$participations = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findByPersonInCircle(
|
||||
$participations = $em->getRepository(Participation::class)->findByPersonInCircle(
|
||||
$person_id,
|
||||
$reachablesCircles,
|
||||
$paginator->getCurrentPage()->getFirstItemNumber(),
|
||||
@@ -352,7 +352,7 @@ class EventController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event_id);
|
||||
$entity = $em->getRepository(Event::class)->find($event_id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Event entity.');
|
||||
|
@@ -59,7 +59,7 @@ class EventTypeController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
|
||||
$entity = $em->getRepository(EventType::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find EventType entity.');
|
||||
@@ -81,7 +81,7 @@ class EventTypeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
|
||||
$entity = $em->getRepository(EventType::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find EventType entity.');
|
||||
@@ -106,7 +106,7 @@ class EventTypeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entities = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->findAll();
|
||||
$entities = $em->getRepository(EventType::class)->findAll();
|
||||
|
||||
return $this->render('@ChillEvent/EventType/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
@@ -138,7 +138,7 @@ class EventTypeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
|
||||
$entity = $em->getRepository(EventType::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find EventType entity.');
|
||||
@@ -161,7 +161,7 @@ class EventTypeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
|
||||
$entity = $em->getRepository(EventType::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find EventType entity.');
|
||||
|
@@ -33,7 +33,9 @@ class ParticipationController extends AbstractController
|
||||
/**
|
||||
* ParticipationController constructor.
|
||||
*/
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {}
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")
|
||||
@@ -239,7 +241,7 @@ class ParticipationController extends AbstractController
|
||||
public function deleteAction($participation_id, Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$participation = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findOneBy([
|
||||
$participation = $em->getRepository(Participation::class)->findOneBy([
|
||||
'id' => $participation_id,
|
||||
]);
|
||||
|
||||
@@ -319,7 +321,7 @@ class ParticipationController extends AbstractController
|
||||
*/
|
||||
public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class)
|
||||
$event = $this->getDoctrine()->getRepository(Event::class)
|
||||
->find($event_id);
|
||||
|
||||
if (null === $event) {
|
||||
@@ -455,8 +457,8 @@ class ParticipationController extends AbstractController
|
||||
*/
|
||||
public function updateMultipleAction(mixed $event_id, Request $request)
|
||||
{
|
||||
/** @var \Chill\EventBundle\Entity\Event $event */
|
||||
$event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class)
|
||||
/** @var Event $event */
|
||||
$event = $this->getDoctrine()->getRepository(Event::class)
|
||||
->find($event_id);
|
||||
|
||||
if (null === $event) {
|
||||
@@ -498,7 +500,7 @@ class ParticipationController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\Form\FormInterface
|
||||
* @return FormInterface
|
||||
*/
|
||||
protected function createEditFormMultiple(Collection $participations, Event $event)
|
||||
{
|
||||
@@ -557,7 +559,7 @@ class ParticipationController extends AbstractController
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
if (null !== $event_id) {
|
||||
$event = $em->getRepository(\Chill\EventBundle\Entity\Event::class)
|
||||
$event = $em->getRepository(Event::class)
|
||||
->find($event_id);
|
||||
|
||||
if (null === $event) {
|
||||
@@ -751,7 +753,7 @@ class ParticipationController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\Form\FormInterface
|
||||
* @return FormInterface
|
||||
*/
|
||||
private function createDeleteForm($participation_id)
|
||||
{
|
||||
|
@@ -59,7 +59,7 @@ class RoleController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
|
||||
$entity = $em->getRepository(Role::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Role entity.');
|
||||
@@ -81,7 +81,7 @@ class RoleController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
|
||||
$entity = $em->getRepository(Role::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Role entity.');
|
||||
@@ -106,7 +106,7 @@ class RoleController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entities = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->findAll();
|
||||
$entities = $em->getRepository(Role::class)->findAll();
|
||||
|
||||
return $this->render('@ChillEvent/Role/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
@@ -138,7 +138,7 @@ class RoleController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
|
||||
$entity = $em->getRepository(Role::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Role entity.');
|
||||
@@ -161,7 +161,7 @@ class RoleController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
|
||||
$entity = $em->getRepository(Role::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Role entity.');
|
||||
|
@@ -59,7 +59,7 @@ class StatusController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
|
||||
$entity = $em->getRepository(Status::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Status entity.');
|
||||
@@ -81,7 +81,7 @@ class StatusController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
|
||||
$entity = $em->getRepository(Status::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Status entity.');
|
||||
@@ -106,7 +106,7 @@ class StatusController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entities = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->findAll();
|
||||
$entities = $em->getRepository(Status::class)->findAll();
|
||||
|
||||
return $this->render('@ChillEvent/Status/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
@@ -138,7 +138,7 @@ class StatusController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
|
||||
$entity = $em->getRepository(Status::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Status entity.');
|
||||
@@ -161,7 +161,7 @@ class StatusController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
|
||||
$entity = $em->getRepository(Status::class)->find($id);
|
||||
|
||||
if (!$entity) {
|
||||
throw $this->createNotFoundException('Unable to find Status entity.');
|
||||
|
Reference in New Issue
Block a user