Add Contract interface for airport lookup functionality (#365)
* Add Contract interface for airport lookup functionality * style ci fixes
This commit is contained in:
29
app/Providers/BindServiceProviders.php
Executable file
29
app/Providers/BindServiceProviders.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Contracts\AirportLookup;
|
||||
use App\Contracts\Metar;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BindServiceProviders extends ServiceProvider
|
||||
{
|
||||
public function boot(): void
|
||||
{
|
||||
/*
|
||||
* Bind the class used to fullfill the Metar class contract
|
||||
*/
|
||||
$this->app->bind(
|
||||
Metar::class,
|
||||
config('phpvms.metar_lookup')
|
||||
);
|
||||
|
||||
/*
|
||||
* Bind the class used to fullfill the AirportLookup class contract
|
||||
*/
|
||||
$this->app->bind(
|
||||
AirportLookup::class,
|
||||
config('phpvms.airport_lookup')
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Contracts\Metar;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class WeatherServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function boot(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
Metar::class,
|
||||
config('phpvms.metar')
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user