AssetsServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 2
1
<?php
2
3
namespace Botble\Assets\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class AssetsServiceProvider.
9
 *
10
 * @since 22/07/2015 11:23 PM
11
 */
12
class AssetsServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * @var \Illuminate\Foundation\Application
16
     */
17
    protected $app;
18
19
    public function boot()
20
    {
21
        $this->mergeConfigFrom(__DIR__ . '/../../config/assets.php', 'assets');
22
        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'assets');
23
24
        if ($this->app->runningInConsole()) {
25
            $this->publishes([__DIR__ . '/../../config/assets.php' => config_path('assets.php')], 'config');
26
            $this->publishes([__DIR__ . '/../../resources/views' => resource_path('views/vendor/assets')], 'views');
27
        }
28
    }
29
}
30