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:
@@ -16,10 +16,8 @@ use Chill\MainBundle\Entity\Notification;
|
||||
use Chill\MainBundle\Notification\NotificationPersisterInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Event\Person\PersonAddressMoveEvent;
|
||||
use DateTimeImmutable;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
@@ -41,7 +39,7 @@ class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
$person = $event->getPerson();
|
||||
|
||||
foreach ($person->getCurrentAccompanyingPeriods() as $period) {
|
||||
if ($period->getStep() === AccompanyingPeriod::STEP_DRAFT) {
|
||||
if (AccompanyingPeriod::STEP_DRAFT === $period->getStep()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -49,7 +47,7 @@ class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
$period->getPersonLocation() === $person
|
||||
&& (
|
||||
$event->getMoveDate() >= $period->getLastLocationHistory()->getStartDate()
|
||||
|| $event->willChangeBeActiveAt(new DateTimeImmutable('now'))
|
||||
|| $event->willChangeBeActiveAt(new \DateTimeImmutable('now'))
|
||||
)
|
||||
&& null !== $period->getUser()
|
||||
&& $period->getUser() !== $this->security->getUser()
|
||||
|
Reference in New Issue
Block a user