GuestPassServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace JeroenG\GuestPass;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class GuestPassServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Perform post-registration booting of services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        // Make the migrations available.
17
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
18
19
        // Register the routes.
20
        app('guestpass')->routes();
21
    }
22
23
    /**
24
     * Register any package services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $this->app->singleton('guestpass', function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed.

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

Loading history...
31
            return new GuestPassService;
32
        });
33
    }
34
35
    /**
36
     * Get the services provided by the provider.
37
     *
38
     * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use string[].

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
39
     */
40
    public function provides()
41
    {
42
        return ['guestpass'];
43
    }
44
}
45