Passed
Push — develop ( d2ded6...15ac65 )
by Nikita
19:39
created

FormServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 12
dl 0
loc 28
ccs 11
cts 11
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 21 1
1
<?php
2
3
namespace Gameap\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use \Collective\Html\FormFacade as Form;
7
8
class FormServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     *
13
     * @return void
14
     */
15 111
    public function boot()
16
    {
17
        view()->composer('*', function () {
18 36
            Form::component('bsInput', 'components.form.input',
19 36
                ['name', 'options' => []]
20
            );
21
22 36
            Form::component('bsText', 'components.form.text',
23 36
                ['name', 'value' => null, 'label' => null, 'attributes' => []]
24
            );
25
26 36
            Form::component('bsTextArea', 'components.form.textarea',
27 36
                ['name', 'value' => null, 'label' => null, 'attributes' => []]
28
            );
29
30 36
            Form::component('bsEmail', 'components.form.email',
31 36
                ['name', 'value' => null, 'label' => null, 'attributes' => []]
32
            );
33
34 36
            Form::component('bsPassword', 'components.form.password',
35 36
                ['name', 'label' => null, 'attributes' => []]
36
            );
37 111
        });
38 111
    }
39
}
40