Completed
Push — master ( 482a48...3ca353 )
by Ariel
02:54
created

TimegridioConciergeServiceProvider::setupRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Timegridio\Concierge;
4
5
use Illuminate\Routing\Router;
6
use Illuminate\Support\ServiceProvider;
7
8
class TimegridioConciergeServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = false;
16
17
    /**
18
     * Perform post-registration booting of services.
19
     *
20
     * @return void
21
     */
22
    public function boot()
23
    {
24
        // use this if your package has views
25
        $this->loadViewsFrom(realpath(__DIR__.'/resources/views'), 'concierge');
26
27
        $this->publishes([
28
            __DIR__.'/../migrations/' => base_path('/database/migrations'),
29
        ]);
30
    }
31
32
    /**
33
     * Register any package services.
34
     *
35
     * @return void
36
     */
37
    public function register()
38
    {
39
        $this->registerConcierge();
40
    }
41
42
    /**
43
     * Register package.
44
     *
45
     * @return Concierge
46
     */
47
    private function registerConcierge()
48
    {
49
        $this->app->bind('concierge', function ($app) {
50
            return new Concierge($app);
0 ignored issues
show
Unused Code introduced by
The call to Concierge::__construct() has too many arguments starting with $app.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
51
        });
52
    }
53
}
54