GetripayVerifyFakeEmailsServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 37

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 37
rs 9.328
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Getripay\GetripayVerifyFakeEmails;
4
5
use Illuminate\Support\ServiceProvider;
6
use Illuminate\Support\Facades\Validator;
7
8
class GetripayVerifyFakeEmailsServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        /*
16
         * Optional methods to load your package assets
17
         */
18
        // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'getripay-verify-fake-emails');
19
        // $this->loadViewsFrom(__DIR__.'/../resources/views', 'getripay-verify-fake-emails');
20
        // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
21
        // $this->loadRoutesFrom(__DIR__.'/routes.php');
22
23
        if ($this->app->runningInConsole()) {
24
            $this->publishes([
25
                __DIR__.'/../config/config.php' => config_path('getripay_verify_fake_emails.php'),
26
            ], 'config');
27
28
            // Publishing the views.
29
            /*$this->publishes([
30
                __DIR__.'/../resources/views' => resource_path('views/vendor/getripay-verify-fake-emails'),
31
            ], 'views');*/
32
33
            // Publishing assets.
34
            /*$this->publishes([
35
                __DIR__.'/../resources/assets' => public_path('vendor/getripay-verify-fake-emails'),
36
            ], 'assets');*/
37
38
            // Publishing the translation files.
39
            /*$this->publishes([
40
                __DIR__.'/../resources/lang' => resource_path('lang/vendor/getripay-verify-fake-emails'),
41
            ], 'lang');*/
42
43
            // Registering package commands.
44
            // $this->commands([]);
45
            Validator::extend('not_fake_email', 'Getripay\GetripayVerifyFakeEmails\GetripayVerifyFakeEmails@validate');
46
        }
47
48
49
    }
50
51
    /**
52
     * Register the application services.
53
     */
54
    public function register()
55
    {
56
        // Automatically apply the package configuration
57
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'getripay_verify_fake_emails');
58
        // Register the main class to use with the facade
59
        $this->app->singleton('getripay-verify-fake-emails', function () {
60
            return new GetripayVerifyFakeEmails;
61
        });
62
63
        $this->app->bind('GetripayVerifyFakeEmails', 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...
64
            return new GetripayVerifyFakeEmails();
65
        });
66
    }
67
}
68