DscanServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 14
dl 0
loc 35
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 16 1
A register() 0 4 1
1
<?php
2
3
namespace Azak1r\Dscan;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class DscanServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->loadViewsFrom(__DIR__. '/resources/views', 'Dscan');
17
        $this->loadMigrationsFrom(__DIR__. '/Database/migrations');
18
19
        $this->publishes([
20
        __DIR__.'/resources/views' => resource_path('views/vendor/Dscan'),
0 ignored issues
show
Bug introduced by
The function resource_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        __DIR__.'/resources/views' => /** @scrutinizer ignore-call */ resource_path('views/vendor/Dscan'),
Loading history...
21
    ], 'views');
22
23
        $this->publishes([
24
        __DIR__ . '/database/migrations' => $this->app->databasePath() . '/migrations'
0 ignored issues
show
Bug introduced by
The method databasePath() does not exist on Illuminate\Contracts\Foundation\Application. Did you maybe mean basePath()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
        __DIR__ . '/database/migrations' => $this->app->/** @scrutinizer ignore-call */ databasePath() . '/migrations'

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
25
    ], 'migrations');
26
27
        $this->publishes([
28
        __DIR__ . '/database/seeds' => $this->app->databasePath() . '/seeds'
29
    ], 'seeds');
30
31
    }
32
33
    /**
34
     * Register services.
35
     *
36
     * @return void
37
     */
38
    public function register()
39
    {
40
        include __DIR__. '/routes/web.php';
41
        $this->app->make('Azak1r\Dscan\Http\Controllers\DscanController');
42
    }
43
}
44