GoogleStructuredDataTestToolServiceProvider   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 1
A register() 0 10 1
A provides() 0 4 1
A dummy() 0 8 2
1
<?php
2
namespace Padosoft\Laravel\Google\StructuredDataTestingTool;
3
4
use Illuminate\Support\ServiceProvider;
5
6
class GoogleStructuredDataTestToolServiceProvider extends ServiceProvider
7
{
8
    /**
9
     * Indicates if loading of the provider is deferred.
10
     *
11
     * @var bool
12
     */
13
    protected $defer = true;
14
15
    /**
16
     * Bootstrap the application events.
17
     *
18
     * @return void
19
     */
20
    public function boot()
21
    {
22
        $this->publishes([
23
            __DIR__ . '/config/laravel-google-structured-data-testing-tool.php' => config_path('laravel-google-structured-data-testing-tool.php'),
24
        ], 'config');
25
26
        $this->loadViewsFrom(__DIR__ . '/views', 'laravel-google-structured-data-testing-tool');
27
28
        $this->publishes([
29
            __DIR__ . '/views' => base_path('resources/views/vendor/laravel-google-structured-data-testing-tool'),
30
        ]);
31
    }
32
33
    /**
34
     * Register the service provider.
35
     *
36
     * @return void
37
     */
38
    public function register()
39
    {
40
        $this->app->singleton('command.google-markup:test',
41
            function () {
42
                return new GoogleStructuredDataTestTool();
43
            }
44
        );
45
46
        $this->commands('command.google-markup:test');
47
    }
48
49
    /**
50
     * Get the services provided by the provider.
51
     *
52
     * @return string[]
53
     */
54
    public function provides()
55
    {
56
        return ['command.google-markup:test'];
57
    }
58
59
    /**
60
     * @param $app
61
     * @return integer
62
     */
63
    public function dummy($app)
64
    {
65
        $i=0;
66
        if($app){
67
            return $i;
68
        }
69
        return $i++;
70
    }
71
}
72