fareSvc = $fareSvc; $this->flightSvc = $flightSvc; } /** * Return the pilot's hourly pay for the given PIREP * @param Pirep $pirep */ public function getPayForPirep(Pirep $pirep) { # Get the base rate for the rank $rank = $pirep->user->rank; if($pirep->source === PirepSource::ACARS) { $base_rate = $rank->acars_base_pay_rate; } else { $base_rate = $rank->manual_base_pay_rate; } } }