Make the command final, enable strict types

This commit is contained in:
Oliver Davies 2020-04-29 23:56:32 +01:00
parent c188676033
commit 71d3314a8e

View file

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace App\Command; namespace App\Command;
use App\Collection\EventCollection; use App\Collection\EventCollection;
@ -14,7 +16,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
class GetRaffleWinnerCommand extends Command final class GetRaffleWinnerCommand extends Command
{ {
protected static $defaultName = 'app:get-raffle-winner'; protected static $defaultName = 'app:get-raffle-winner';
@ -85,7 +87,7 @@ class GetRaffleWinnerCommand extends Command
OutputInterface $output OutputInterface $output
): int { ): int {
$io = new SymfonyStyle($input, $output); $io = new SymfonyStyle($input, $output);
$eventId = $input->getArgument('event_id'); $eventId = (int) $input->getArgument('event_id');
$this->retrieveEventData($eventId); $this->retrieveEventData($eventId);
$this->retrieveRsvps($eventId); $this->retrieveRsvps($eventId);