mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -18,7 +18,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Doctrine\Persistence\Event\LifecycleEventArgs;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Symfony\Component\Workflow\Event\EnteredEvent;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
@@ -39,7 +38,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
if (
|
||||
$enteredEvent->getMarking()->has(AccompanyingPeriod::STEP_CONFIRMED)
|
||||
and $enteredEvent->getTransition()->getName() === 'confirm'
|
||||
and 'confirm' === $enteredEvent->getTransition()->getName()
|
||||
) {
|
||||
$this->onPeriodConfirmed($enteredEvent->getSubject());
|
||||
}
|
||||
@@ -50,7 +49,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
if ($period->isChangedUser()
|
||||
&& $period->getUser() !== $this->security->getUser()
|
||||
&& null !== $period->getUser()
|
||||
&& $period->getStep() !== AccompanyingPeriod::STEP_DRAFT
|
||||
&& AccompanyingPeriod::STEP_DRAFT !== $period->getStep()
|
||||
&& !$period->isPreventUserIsChangedNotification()
|
||||
) {
|
||||
$this->generateNotificationToUser($period);
|
||||
@@ -62,12 +61,12 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
$notification = new Notification();
|
||||
|
||||
$urgentStatement =
|
||||
$period->isEmergency() ? strtoupper($this->translator->trans('accompanying_period.emergency')) . ' ' : '';
|
||||
$period->isEmergency() ? strtoupper($this->translator->trans('accompanying_period.emergency')).' ' : '';
|
||||
|
||||
$notification
|
||||
->setRelatedEntityId($period->getId())
|
||||
->setRelatedEntityClass(AccompanyingPeriod::class)
|
||||
->setTitle($urgentStatement . $this->translator->trans('period_notification.period_designated_subject'))
|
||||
->setTitle($urgentStatement.$this->translator->trans('period_notification.period_designated_subject'))
|
||||
->setMessage($this->engine->render(
|
||||
'@ChillPerson/Notification/accompanying_course_designation.md.twig',
|
||||
[
|
||||
|
Reference in New Issue
Block a user