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

        $incomingStateList = $event->getIncomingStates();

        return empty(\array_diff($neededIncomingStates, $incomingStateList));
    }
private function checkNeededIncomingStates(EventInterface $event): bool
    {
        $neededIncomingStates = $this->listNeededIncomingStates();
        if (empty($neededIncomingStates)) {
            return true;
        }

        $incomingStateList = $event->getIncomingStates();

        return empty(\array_diff($neededIncomingStates, $incomingStateList));
    }
@param EventInterface $event

@return bool