Skip to content

Commit

Permalink
Merge pull request #1 from flavioheleno/fix/year-type
Browse files Browse the repository at this point in the history
Fix -y|--year option type handling
  • Loading branch information
colinodell authored Dec 1, 2023
2 parents a3fe7a7 + 8025887 commit 6979748
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/aoc-downloader
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ foreach ($autoloadPaths as $path) {
$downloader = new Downloader($input->getArgument('session_id'));
$dir = $input->getOption('output');

if ($year = $input->getOption('year')) {
if ($year = (int)$input->getOption('year')) {
$years = [$year];
} else {
$years = range(2015, date('Y'));
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@
"psr-4": {
"ColinODell\\AOCDownloader\\": "src/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

0 comments on commit 6979748

Please sign in to comment.