LaravelWeekdayServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace ChinLeung\LaravelWeekday;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LaravelWeekdayServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        $this->loadTranslationsFrom(__DIR__.'/../vendor/chinleung/php-weekday/resources/lang', 'laravel-weekday');
15
16
        if ($this->app->runningInConsole()) {
17
            $this->publishes([
18
                __DIR__.'/../vendor/chinleung/php-weekday/resources/lang' => resource_path('lang/vendor/laravel-weekday'),
19
            ], 'lang');
20
        }
21
    }
22
23
    /**
24
     * Register the application services.
25
     */
26
    public function register()
27
    {
28
        $this->app->singleton('laravel-weekday', function () {
29
            return new Weekday;
30
        });
31
    }
32
}
33