FormerServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tinyissue\Providers;
13
14
/**
15
 * FormerServiceProvider for extending Former service provider.
16
 *
17
 * @author Mohamed Alsharaf <[email protected]>
18
 */
19
class FormerServiceProvider extends \Former\FormerServiceProvider
20
{
21
    /**
22
     * Register the HTML builder instance.
23
     */
24 50
    public function register()
25
    {
26 50
        parent::register();
27
28 50
        $this->app['former.dispatcher']->addRepository('Tinyissue\\Form\Former\\Fields\\');
29
30
        // Stop it from rendering field name into label
31 50
        \Former::setOption('automatic_label', false);
32 50
        \Former::setOption('TwitterBootstrap3.labelWidths', [
33 50
            'large' => 2,
34
            'small' => 3,
35
        ]);
36 50
    }
37
}
38