src/Scenario/Scenario.php
private function checkNeededOutgoingStates(EventInterface $event): bool
    {
        $neededOutgoingStates = $this->listNeededOutgoingStates();
        if (empty($neededOutgoingStates)) {
            return true;
        }

        $outgoingStatesList = $event->getOutgoingStates();

        return empty(\array_diff($neededOutgoingStates, $outgoingStatesList));
    }
private function checkNeededOutgoingStates(EventInterface $event): bool
    {
        $neededOutgoingStates = $this->listNeededOutgoingStates();
        if (empty($neededOutgoingStates)) {
            return true;
        }

        $outgoingStatesList = $event->getOutgoingStates();

        return empty(\array_diff($neededOutgoingStates, $outgoingStatesList));
    }
@param EventInterface $event

@return bool