public function getFlights($onlyFirstAgentPerItinerary = true): array
    {
        if ($this->init()) {
            $this->flights = [];
            $this->addItineraries($onlyFirstAgentPerItinerary);
            $this->beautifyFlights($onlyFirstAgentPerItinerary);
        } else {
            $this->printErrorMessage($this->getResponseMessage());
        }
        return $this->flights;
    }
public function getFlights($onlyFirstAgentPerItinerary = true): array
    {
        if ($this->init()) {
            $this->flights = [];
            $this->addItineraries($onlyFirstAgentPerItinerary);
            $this->beautifyFlights($onlyFirstAgentPerItinerary);
        } else {
            $this->printErrorMessage($this->getResponseMessage());
        }
        return $this->flights;
    }
public function getFlights ( $ onlyFirstAgentPerItinerary = true ) : array { if ( $ this -> init ( ) ) { $ this -> flights = [ ] ; $ this -> addItineraries ( $ onlyFirstAgentPerItinerary ) ; $ this -> beautifyFlights ( $ onlyFirstAgentPerItinerary ) ; } else { $ this -> printErrorMessage ( $ this -> getResponseMessage ( ) ) ; } return $ this -> flights ; }
Get modified data where the each agent and carrier is assigned to each itinerary
If you only want to get get the first one, it will remove Agents property
Whereas Agent property will hold the first agent within the array sorted with given sorttype property

@param bool $onlyFirstAgentPerItinerary

@return array
@throws \GuzzleHttp\Exception\GuzzleException
Get modified data where the each agent and carrier is assigned to each itinerary If you only want to get get the first one it will remove Agents property Whereas Agent property will hold the first agent within the array sorted with given sorttype property