FormServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 26
c 0
b 0
f 0
dl 0
loc 44
rs 10
ccs 13
cts 13
cp 1

1 Method

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