FakerImageGeneratorServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 13 2
A register() 0 5 1
1
<?php
2
3
namespace Swatty007\FakerImageGenerator;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class FakerImageGeneratorServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        if ($this->app->runningInConsole()) {
15
            $this->publishes([
16
                __DIR__.'/../config/config.php' => config_path('faker-image-generator.php'),
17
            ], 'config');
18
19
            // Publishing assets.
20
            $this->publishes([
21
                __DIR__.'/../resources/assets' => public_path('vendor/faker-image-generator'),
22
            ], 'assets');
23
        }
24
    }
25
26
    /**
27
     * Register the application services.
28
     */
29
    public function register()
30
    {
31
        // Automatically apply the package configuration
32
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'faker-image-generator');
33
    }
34
}
35