bidSvc = $bidSvc; } /** * @param $events */ public function subscribe(Dispatcher $events): void { $events->listen( PirepAccepted::class, 'App\Listeners\BidEvents@onPirepAccept' ); } /** * When a PIREP is accepted, remove any bids * * @param PirepAccepted $event * * @throws \UnexpectedValueException * @throws \InvalidArgumentException * @throws \Exception */ public function onPirepAccept(PirepAccepted $event): void { $this->bidSvc->removeBidForPirep($event->pirep); } }