/** * @param integer $daysOld * @return void */ public function deleteOldCommand($daysOld) { $deployments = $this->deploymentRepository->findByDaysOld($daysOld); if (count($deployments) > 0) { foreach ($deployments as $deployment) { $this->deploymentRepository->remove($deployment); $this->outputLine('deployment removed'); } } else { $this->outputLine('no deployments found'); } }