CountdownServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 2
b 0
f 0
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 10 1
1
<?php
2
3
namespace jpmurray\LaravelCountdown;
4
5
use Carbon\Carbon;
6
use Illuminate\Support\ServiceProvider;
7
use jpmurray\LaravelCountdown\Countdown;
8
9
class CountdownServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Perform post-registration booting of services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        //
19
    }
20
21
    /**
22
     * Register any package services.
23
     *
24
     * @return void
25
     */
26
    public function register()
27
    {
28
        $this->app->bind('jpmurray.countdown', function ($app) {
29
            $carbon = new Carbon;
30
            $timezone = $app->config->get('app.timezone');
31
32
            return new Countdown($timezone, $carbon);
33
        });
34
35
        $this->app->alias('jpmurray.countdown', Countdown::class);
36
    }
37
}
38