@@ -618,33 +618,33 @@ you a central place to manage the text.
618618 This is a simple example; in production you may prefer to use the:doc: `Translation </components/translation >`
619619 component to manage messages in one place::
620620
621- namespace App\L istener\W orkflow\T ask;
621+ namespace App\Listener\Workflow\Task;
622622
623- use Symfony\C omponent\E ventDispatcher\E ventSubscriberInterface;
624- use Symfony\C omponent\W orkflow\E vent\G uardEvent;
625- use Symfony\C omponent\W orkflow\T ransitionBlocker;
623+ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
624+ use Symfony\Component\Workflow\Event\GuardEvent;
625+ use Symfony\Component\Workflow\TransitionBlocker;
626626
627- class OverdueGuard implements EventSubscriberInterface
628- {
629- public function guardPublish(GuardEvent $event)
627+ class OverdueGuard implements EventSubscriberInterface
630628 {
631- $timeLimit = $event->getMetadata('time_limit', $event->getTransition());
629+ public function guardPublish(GuardEvent $event)
630+ {
631+ $timeLimit = $event->getMetadata('time_limit', $event->getTransition());
632632
633- if (date('Hi') <= $timeLimit) {
634- return;
635- }
633+ if (date('Hi') <= $timeLimit) {
634+ return;
635+ }
636636
637- $explanation = $event->getMetadata('explanation', $event->getTransition());
638- $event->addTransitionBlocker(new TransitionBlocker($explanation , 0));
639- }
637+ $explanation = $event->getMetadata('explanation', $event->getTransition());
638+ $event->addTransitionBlocker(new TransitionBlocker($explanation , 0));
639+ }
640640
641- public static function getSubscribedEvents()
642- {
643- return [
644- 'workflow.task.guard.done' => 'guardPublish',
645- ];
641+ public static function getSubscribedEvents()
642+ {
643+ return [
644+ 'workflow.task.guard.done' => 'guardPublish',
645+ ];
646+ }
646647 }
647- }
648648
649649..versionadded ::4.1
650650