Completed
Push — master ( c88f25...77d6c6 )
by Nicholas
01:02
created

USPSLookupServiceProvider::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Nickcheek\USPSLookup;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class USPSLookupServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
15
        if ($this->app->runningInConsole()) {
16
            $this->publishes([
17
                __DIR__.'/../config/config.php' => config_path('uspslookup.php'),
18
            ], 'config');
19
        }
20
    }
21
22
    /**
23
     * Register the application services.
24
     */
25
    public function register()
26
    {
27
        // Automatically apply the package configuration
28
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'uspslookup');
29
30
        // Register the main class to use with the facade
31
        $this->app->singleton('uspslookup', function () {
32
            return new USPSLookup;
33
        });
34
    }
35
}
36