ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 24
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 5 1
A shareJS() 0 12 1
1
<?php namespace Rocket\UI\Script\Support\Laravel5;
2
3
/**
4
 * Register special service providers
5
 */
6
class ServiceProvider extends \Illuminate\Support\ServiceProvider
7
{
8
    /**
9
     * {@inheritdoc}
10
     */
11
    public function register()
12
    {
13
14
        $this->shareJS();
15
    }
16
17
    protected function shareJS()
18
    {
19
        $this->app->singleton(
20
            'js',
21
            function () {
22
                $js = new JS([]);
23
                $this->app['events']->dispatch('js.init', [$js]);
24
25
                return $js;
26
            }
27
        );
28
    }
29
}
30