addOption('auto-fix', null, null, 'Automatically fix failed items (if possible)');
}
public function handle(): int
{
try {
$checker = new CheckListHandler($this->input, $this->output);
$checker->runCheck($this->input->getOption('auto-fix') ? FIX_POLICY_AUTOFIX : FIX_POLICY_PROMPT);
$this->output->writeln('Doctor check complete !');
} catch (\Throwable $e) {
$this->output->writeln('' . $e->getMessage() . '');
pcntl_signal(SIGINT, SIG_IGN);
return static::FAILURE;
}
return static::SUCCESS;
}
}