findByIdentifier($stationName); if (!$station instanceof Station) { $io->error('Station not found.'); return 1; } $stations = [$station]; } else { $io->section('Restarting all radio stations...'); /** @var Station[] $stations */ $stations = $stationRepo->fetchAll(); } $io->progressStart(count($stations)); foreach ($stations as $station) { $configuration->writeConfiguration($station, true); $io->progressAdvance(); } $io->progressFinish(); return 0; } }