/**
  * @param EventInterface $event
  *
  * @return bool
  */
 protected function checkNeededOutgoingStates(EventInterface $event) : bool
 {
     $neededOutgoingStatesList = $this->listNeededOutgoingStates();
     if (empty($neededOutgoingStatesList)) {
         return true;
     }
     $outgoingStatesList = $event->getOutgoingStates();
     return empty(\array_diff($neededOutgoingStatesList, $outgoingStatesList));
 }
 /**
  * {@inheritdoc}
  */
 public function getToken(EventInterface $event) : array
 {
     $object = $event->getObject();
     $statedClassName = $this->getStatedClassInstanceToken($object);
     $tokenList = [$statedClassName];
     foreach ($event->getEnabledStates() as $stateName) {
         $tokenList[] = $statedClassName . ':' . \strtolower($stateName);
     }
     foreach ($event->getIncomingStates() as $stateName) {
         $tokenList[] = $statedClassName . ':+' . \strtolower($stateName);
     }
     foreach ($event->getOutgoingStates() as $stateName) {
         $tokenList[] = $statedClassName . ':-' . \strtolower($stateName);
     }
     return $tokenList;
 }