ServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 17 1
1
<?php namespace Rocket\UI\Forms\Support\Laravel5;
2
3
use Rocket\UI\Forms\Fields\Field;
4
use Rocket\UI\Forms\Forms;
5
6
class ServiceProvider extends \Illuminate\Support\ServiceProvider
7
{
8
    /**
9
     * {@inheritdoc}
10
     */
11
    public function register()
12
    {
13
        $this->publishes(
14
            [
15
                __DIR__ . '/config.php' => config_path('rocket_ui_forms.php'),
16
            ]
17
        );
18
19
        Forms::setConfig($this->app['config']->get('rocket_ui_forms'));
20
21
        //By doing it like this we allow it to be lazily loaded into the forms
22
        Field::setJSResolver(
23
            function () {
24
                return $this->app->make('js');
25
            }
26
        );
27
    }
28
}
29