src/Scenario/Scenario.php
private function checkNeededStatedObject(EventInterface $event): bool
    {
        $neededStatedObject = $this->getNeededStatedObject();
        if (!$neededStatedObject instanceof LifeCyclableInterface) {
            return true;
        }

        return $neededStatedObject === $event->getObject();
    }
private function checkNeededStatedObject(EventInterface $event): bool
    {
        $neededStatedObject = $this->getNeededStatedObject();
        if (!$neededStatedObject instanceof LifeCyclableInterface) {
            return true;
        }

        return $neededStatedObject === $event->getObject();
    }
@param EventInterface $event

@return bool