mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -14,14 +14,12 @@ namespace Chill\MainBundle\Workflow\EventSubscriber;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\MainBundle\Templating\Entity\UserRender;
|
||||
use DateTimeImmutable;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Workflow\Event\Event;
|
||||
use Symfony\Component\Workflow\Event\GuardEvent;
|
||||
use Symfony\Component\Workflow\TransitionBlocker;
|
||||
use function array_key_exists;
|
||||
|
||||
class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
@@ -112,7 +110,7 @@ class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterfac
|
||||
$placeMetadata = $event->getWorkflow()->getMetadataStore()
|
||||
->getPlaceMetadata($step->getCurrentStep());
|
||||
|
||||
if (array_key_exists('isFinal', $placeMetadata) && true === $placeMetadata['isFinal']) {
|
||||
if (\array_key_exists('isFinal', $placeMetadata) && true === $placeMetadata['isFinal']) {
|
||||
$step->setIsFinal(true);
|
||||
}
|
||||
}
|
||||
@@ -129,7 +127,7 @@ class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterfac
|
||||
|
||||
$step
|
||||
->setTransitionAfter($event->getTransition()->getName())
|
||||
->setTransitionAt(new DateTimeImmutable('now'))
|
||||
->setTransitionAt(new \DateTimeImmutable('now'))
|
||||
->setTransitionBy($this->security->getUser());
|
||||
|
||||
$this->chillLogger->info('[workflow] apply transition on entityWorkflow', [
|
||||
|
Reference in New Issue
Block a user