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

FormServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 21
ccs 11
cts 11
cp 1
rs 9.9
c 1
b 0
f 0
cc 1
nc 1
nop 0
crap 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