Refactor framework to support more years

This commit is contained in:
2021-12-09 22:41:22 +01:00
parent 8f6de7b627
commit 55e4e62d97
6 changed files with 37 additions and 23 deletions

View File

@ -3,6 +3,9 @@
namespace trizz\AdventOfCode;
use JetBrains\PhpStorm\ArrayShape;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
abstract class Solution
{
@ -90,7 +93,7 @@ abstract class Solution
return !empty($this->exampleData);
}
#[ArrayShape(['part1' => 'int|string', 'part2' => 'int|string'])]
#[ArrayShape(['part1' => "int|string", 'part2' => "int|string"])]
public function results(bool $useExampleData = true): array
{
$data = $useExampleData ? $this->exampleData : $this->data;