Apply rector, phpstan and php-cs-fixer
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-29 19:52:02 +01:00
parent f35c24d35d
commit b07b0b2ae8
22 changed files with 869 additions and 1105 deletions

View File

@ -7,19 +7,14 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ExecuteDay extends Command
final class ExecuteDay extends Command
{
protected int $day;
private int $day;
private int $year;
protected int $year;
/**
* @var string The title.
*/
private string $title;
/**
* Configure the command.
*/
protected function configure(): void
{
$this
@ -29,10 +24,6 @@ class ExecuteDay extends Command
->addArgument('year', InputArgument::OPTIONAL, 'The year', date('y'));
}
/**
* Initializes the command after the input has been bound and before the input
* is validated.
*/
protected function initialize(InputInterface $input, OutputInterface $output): void
{
$this->day = $input->getArgument('day');
@ -45,14 +36,10 @@ class ExecuteDay extends Command
$output->writeln(str_repeat('-', strlen($this->title)));
}
/**
* Executes the current command.
*
* @return int 0 if everything went fine, or an exit code
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
$className = sprintf('%s\\Y%d\\Day%d', __NAMESPACE__, $this->year, $this->day);
/** @var Solution $class */
$class = new $className();
$class->loadData();