Use PHP 7.4 typed properties

Fixes #8
This commit is contained in:
Oliver Davies 2020-05-05 10:18:01 +01:00
parent 2e0ec011f2
commit 9b58af3a62

View file

@ -20,43 +20,17 @@ final class GetRaffleWinnerCommand extends Command
{ {
protected static $defaultName = 'app:get-raffle-winner'; protected static $defaultName = 'app:get-raffle-winner';
/** private HttpClientInterface $client;
* @var \Symfony\Contracts\HttpClient\HttpClientInterface
*/
private $client;
/** private CacheInterface $cache;
* @var \Symfony\Contracts\Cache\CacheInterface
*/
private $cache;
/** private array $eventData = [];
* The event data.
*
* @var array
*/
private $eventData = [];
/** private Collection $rsvps;
* All of the RSVPs for this event.
*
* @var \Illuminate\Support\Collection
*/
private $rsvps;
/** private Collection $yesRsvps;
* All of the 'yes' RSVPs for this event.
*
* @var \Illuminate\Support\Collection
*/
private $yesRsvps;
/** private ?array $winner;
* The picked winner.
*
* @var null|array
*/
private $winner;
public function __construct( public function __construct(
HttpClientInterface $client, HttpClientInterface $client,
@ -65,10 +39,9 @@ final class GetRaffleWinnerCommand extends Command
) { ) {
parent::__construct($name); parent::__construct($name);
$this->client = $client; $this->client = $client;
$this->cache = $cache; $this->cache = $cache;
$this->rsvps = new Collection();
$this->yesRsvps = new Collection();
} }
protected function configure() protected function configure()