Passed
Push — main ( be1355...6c0d46 )
by PRATIK
02:24 queued 12s
created

NepalidateServiceProvider::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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