Completed
Push — develop ( 64265e...12ceca )
by Mohamed
10:07
created

FormerServiceProvider::register()   A

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 2
Bugs 0 Features 0
Metric Value
c 2
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 46
    public function register()
25
    {
26 46
        parent::register();
27
28 46
        $this->app['former.dispatcher']->addRepository('Tinyissue\\Form\Former\\Fields\\');
29
30
        // Stop it from rendering field name into label
31 46
        \Former::setOption('automatic_label', false);
32 46
        \Former::setOption('TwitterBootstrap3.labelWidths', [
33 46
            'large' => 2,
34
            'small' => 3,
35
        ]);
36 46
    }
37
}
38