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

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

        return empty(\array_intersect($forbiddenStatesList, $enabledStatesList));
    }
private function checkForbiddenStates(EventInterface $event): bool
    {
        $forbiddenStatesList = $this->listForbiddenStates();
        if (empty($forbiddenStatesList)) {
            return true;
        }

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

        return empty(\array_intersect($forbiddenStatesList, $enabledStatesList));
    }
@param EventInterface $event

@return bool