Completed
Push — master ( a739bd...7ba4fa )
by ARCANEDEV
05:29
created

HelpersServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 31
ccs 6
cts 8
cp 0.75
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A registerNotificationHelper() 0 9 1
1
<?php namespace Arcanesoft\Core\Providers;
2
3
use Arcanedev\Support\ServiceProvider;
4
use Arcanesoft\Core\Helpers;
5
6
/**
7
 * Class     HelpersServiceProvider
8
 *
9
 * @package  Arcanesoft\Foundation\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class HelpersServiceProvider extends ServiceProvider
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * Register the service provider.
20
     */
21 8
    public function register()
22
    {
23 8
        $this->registerNotificationHelper();
24 8
    }
25
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Register Helpers
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * The notification helper.
32
     */
33
    private function registerNotificationHelper()
34
    {
35 8
        $this->singleton('arcanesoft.helpers.notification', function ($app) {
36
            /** @var  \Illuminate\Session\Store $session */
37
            $session = $app['session.store'];
38
39
            return new Helpers\Notification($session);
40 8
        });
41 8
    }
42
}
43