LaravelCookieConsentServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 10 1
1
<?php
2
3
namespace W3designweb\LaravelCookieConsent;
4
5
use Illuminate\Routing\Router;
6
use Illuminate\Support\ServiceProvider;
7
8
class LaravelCookieConsentServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application events.
12
     *
13
     * @return void
14
     */
15
    public function boot(Router $router)
0 ignored issues
show
Unused Code introduced by
The parameter $router is not used and could be removed. ( Ignorable by Annotation )

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

15
    public function boot(/** @scrutinizer ignore-unused */ Router $router)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
16
    {
17
        $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'laravel-cookie-consent');
18
        $this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-cookie-consent');
19
20
        $this->publishes([__DIR__.'/../config/config.php' => config_path('laravel-cookie-consent.php')], 'config');
0 ignored issues
show
Bug introduced by
The function config_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
        $this->publishes([__DIR__.'/../config/config.php' => /** @scrutinizer ignore-call */ config_path('laravel-cookie-consent.php')], 'config');
Loading history...
21
        $this->publishes([__DIR__.'/../resources/lang' => resource_path('lang/vendor/laravel-cookie-consent')], 'lang');
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

21
        $this->publishes([__DIR__.'/../resources/lang' => /** @scrutinizer ignore-call */ resource_path('lang/vendor/laravel-cookie-consent')], 'lang');
Loading history...
22
        $this->publishes([__DIR__.'/../resources/js' => public_path('vendor/laravel-cookie-consent')], 'public');
0 ignored issues
show
Bug introduced by
The function public_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

22
        $this->publishes([__DIR__.'/../resources/js' => /** @scrutinizer ignore-call */ public_path('vendor/laravel-cookie-consent')], 'public');
Loading history...
23
        $this->publishes([__DIR__.'/../resources/css' => public_path('vendor/laravel-cookie-consent')], 'public');
24
        $this->publishes([__DIR__.'/../resources/views' => resource_path('views/vendor/laravel-cookie-consent')], 'views');
25
    }
26
27
    /**
28
     * Register the service provider.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-cookie-consent');
35
    }
36
}
37