Completed
Push — master ( 3f7578...5307b5 )
by ARCANEDEV
04:28
created

ComposerServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 47
ccs 19
cts 19
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 4 1
A registerDashboardComposers() 0 17 1
1
<?php namespace Arcanesoft\Tracker\Providers;
2
3
use Arcanedev\Support\ServiceProvider;
4
use Arcanesoft\Tracker\ViewComposers\Dashboard;
5
6
/**
7
 * Class     ComposerServiceProvider
8
 *
9
 * @package  Arcanesoft\Tracker\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class ComposerServiceProvider extends ServiceProvider
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * {@inheritdoc}
20
     */
21 4
    public function boot()
22
    {
23 4
        $this->registerDashboardComposers();
24 4
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 4
    public function register()
30
    {
31
        //
32 4
    }
33
34
    /* ------------------------------------------------------------------------------------------------
35
     |  Other Functions
36
     | ------------------------------------------------------------------------------------------------
37
     */
38
    /**
39
     * Register all the dashboard view composers.
40
     */
41 4
    private function registerDashboardComposers()
42
    {
43 4
        view()->composer(
44 4
            Dashboard\LatestThirtyDaysVisitsAndVisitorsComposer::VIEW,
45 2
            Dashboard\LatestThirtyDaysVisitsAndVisitorsComposer::class
46 2
        );
47
48 4
        view()->composer(
49 4
            Dashboard\AuthenticatedVisitorsRatioComposer::VIEW,
50 2
            Dashboard\AuthenticatedVisitorsRatioComposer::class
51 2
        );
52
53 4
        view()->composer(
54 4
            Dashboard\DevicesRatioComposer::VIEW,
55 2
            Dashboard\DevicesRatioComposer::class
56 2
        );
57 4
    }
58
}
59