canUpdateStep = $canUpdateStep; $this->updatesSteps = $updatesSteps; $this->fetchesSteps = $fetchesSteps; } public function execute(string $currentStep){ $orderStepsObject = new StepsObject(0,$currentStep, 0, 0, 1, 1, null, 0, null); $this->canUpdateStep->passes($orderStepsObject); $orderSteps = $this->fetchesSteps->execute(['reference'=>$currentStep]); $this->updatesSteps->execute($orderSteps, $orderStepsObject); } }