protected function _switchOff($output, $flagFile) { if (file_exists($flagFile)) { if (!unlink($flagFile)) { throw new \RuntimeException('maintenance.flag file is not removable.'); } } $output->writeln('Maintenance mode <info>off</info>'); }