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

        $enabledStatesList = $event->getObject()->listEnabledStates();

        return empty(\array_diff($neededStatesList, $enabledStatesList));
    }
private function checkNeededStates(EventInterface $event): bool
    {
        $neededStatesList = $this->listNeededStates();
        if (empty($neededStatesList)) {
            return true;
        }

        $enabledStatesList = $event->getObject()->listEnabledStates();

        return empty(\array_diff($neededStatesList, $enabledStatesList));
    }
@param EventInterface $event

@return bool