phpvms/app/Services/AirportLookup/VaCentralLookup.php
Nabeel S 6018a6dcaa
Add Contract interface for airport lookup functionality (#365)
* Add Contract interface for airport lookup functionality

* style ci fixes
2019-08-22 14:32:49 -04:00

29 lines
538 B
PHP

<?php
namespace App\Services\AirportLookup;
use App\Contracts\AirportLookup;
use Illuminate\Support\Facades\Log;
use VaCentral\Airport;
use VaCentral\HttpException;
class VaCentralLookup extends AirportLookup
{
/**
* Lookup the information for an airport
*
* @param string $icao
*
* @return array
*/
public function getAirport($icao)
{
try {
return Airport::get($icao);
} catch (HttpException $e) {
Log::error($e);
return;
}
}
}