mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply rector rules: symfony **UP TO** 44
This commit is contained in:
@@ -281,7 +281,7 @@ final class ActivityController extends AbstractController
|
||||
'element_class' => Activity::class,
|
||||
'action' => 'list',
|
||||
]);
|
||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||
$this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT);
|
||||
|
||||
$view = 'ChillActivityBundle:Activity:listPerson.html.twig';
|
||||
} elseif ($accompanyingPeriod instanceof AccompanyingPeriod) {
|
||||
|
@@ -31,12 +31,12 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
$form = $this->createCreateForm($entity);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_activity_activityreasoncategory_show', ['id' => $entity->getId()]));
|
||||
return $this->redirectToRoute('chill_activity_activityreasoncategory_show', ['id' => $entity->getId()]);
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReasonCategory:new.html.twig', [
|
||||
@@ -128,10 +128,10 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
$editForm = $this->createEditForm($entity);
|
||||
$editForm->handleRequest($request);
|
||||
|
||||
if ($editForm->isValid()) {
|
||||
if ($editForm->isSubmitted() && $editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_activity_activityreasoncategory_edit', ['id' => $id]));
|
||||
return $this->redirectToRoute('chill_activity_activityreasoncategory_edit', ['id' => $id]);
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReasonCategory:edit.html.twig', [
|
||||
|
@@ -37,12 +37,12 @@ class ActivityReasonController extends AbstractController
|
||||
$form = $this->createCreateForm($entity);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_activity_activityreason', ['id' => $entity->getId()]));
|
||||
return $this->redirectToRoute('chill_activity_activityreason', ['id' => $entity->getId()]);
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:new.html.twig', [
|
||||
@@ -134,10 +134,10 @@ class ActivityReasonController extends AbstractController
|
||||
$editForm = $this->createEditForm($entity);
|
||||
$editForm->handleRequest($request);
|
||||
|
||||
if ($editForm->isValid()) {
|
||||
if ($editForm->isSubmitted() && $editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_activity_activityreason', ['id' => $id]));
|
||||
return $this->redirectToRoute('chill_activity_activityreason', ['id' => $id]);
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:edit.html.twig', [
|
||||
|
@@ -38,11 +38,6 @@ class TranslatableActivityReasonCategoryType extends AbstractType
|
||||
);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'translatable_activity_reason_category';
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return EntityType::class;
|
||||
|
@@ -260,7 +260,7 @@ final class ActivityControllerTest extends WebTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\BrowserKit\Client
|
||||
* @return \Symfony\Component\BrowserKit\AbstractBrowser
|
||||
*/
|
||||
private function getAuthenticatedClient(mixed $username = 'center a_social')
|
||||
{
|
||||
|
Reference in New Issue
Block a user