AuthServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Auth\Providers;
6
7
use Illuminate\Routing\Router;
8
use Illuminate\Support\ServiceProvider;
9
use Rinvex\Support\Traits\ConsoleTools;
10
use Rinvex\Auth\Console\Commands\PublishCommand;
11
use Rinvex\Auth\Services\PasswordResetBrokerManager;
12
use Rinvex\Auth\Services\EmailVerificationBrokerManager;
13
14
class AuthServiceProvider extends ServiceProvider
15
{
16
    use ConsoleTools;
17
18
    /**
19
     * The commands to be registered.
20
     *
21
     * @var array
22
     */
23
    protected $commands = [
24
        PublishCommand::class => 'command.rinvex.auth.publish',
25
    ];
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function register()
31
    {
32
        // Register console commands
33
        $this->registerCommands($this->commands);
34
35
        // Register the password reset broker manager
36
        $this->app->singleton('auth.password', function ($app) {
37
            return new PasswordResetBrokerManager($app);
38
        });
39
40
        // Register the verification broker manager
41
        $this->app->singleton('rinvex.auth.emailverification', function ($app) {
42
            return new EmailVerificationBrokerManager($app);
43
        });
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function boot(Router $router)
0 ignored issues
show
Unused Code introduced by
The parameter $router 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...
50
    {
51
        // Publish resources
52
        $this->publishesConfig('rinvex/laravel-auth');
53
    }
54
}
55