Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
Emanuel Mutschlechner
2018-08-29 23:26:45 +00:00
2 changed files with 6 additions and 7 deletions

View File

@@ -39,7 +39,6 @@ return [
'enabled' => env('MAPS_ENABLED', true), 'enabled' => env('MAPS_ENABLED', true),
'maps' => [ 'maps' => [
'google' => [ 'google' => [

View File

@@ -15,12 +15,12 @@ class MapsServiceProvider extends BaseServiceProvider
public function boot() public function boot()
{ {
$this->publishFiles(); $this->publishFiles();
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'maps'); $this->loadViewsFrom(__DIR__.'/../resources/views', 'maps');
view()->composer('maps::*', function ($view) { view()->composer('maps::*', function ($view) {
$type = $view->type ?? config('vendor.maps.default'); $type = $view->type ?? config('vendor.maps.default');
$enabled = $view->enabled ?? config('vendor.maps.enabled'); $enabled = $view->enabled ?? config('vendor.maps.enabled');
$key = config('vendor.maps.maps.' . $type . '.key'); $key = config('vendor.maps.maps.'.$type.'.key');
// TODO: Warn missing key? // TODO: Warn missing key?
@@ -53,7 +53,7 @@ class MapsServiceProvider extends BaseServiceProvider
*/ */
public function register() public function register()
{ {
$this->mergeConfigFrom(__DIR__ . '/../config/maps.php', 'vendor.maps'); $this->mergeConfigFrom(__DIR__.'/../config/maps.php', 'vendor.maps');
Blade::include('maps::styles', 'mapstyles'); Blade::include('maps::styles', 'mapstyles');
Blade::include('maps::scripts', 'mapscripts'); Blade::include('maps::scripts', 'mapscripts');
@@ -69,13 +69,13 @@ class MapsServiceProvider extends BaseServiceProvider
{ {
if ($this->app->runningInConsole()) { if ($this->app->runningInConsole()) {
$this->publishes([ $this->publishes([
__DIR__ . '/../config/maps.php' => config_path('vendor/maps.php'), __DIR__.'/../config/maps.php' => config_path('vendor/maps.php'),
], 'config'); ], 'config');
$this->publishes([ $this->publishes([
__DIR__ . '/../public' => public_path('vendor/maps'), __DIR__.'/../public' => public_path('vendor/maps'),
], 'public'); ], 'public');
$this->publishes([ $this->publishes([
__DIR__ . '/../public' => public_path('vendor/maps'), __DIR__.'/../public' => public_path('vendor/maps'),
], 'maps'); ], 'maps');
} }
} }