HtmlServiceProvider::registerHtmlBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
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
use Tinyissue\Extensions\Html;
15
16
/**
17
 * HtmlServiceProvider for extending Laravel Html service provider.
18
 *
19
 * @author Mohamed Alsharaf <[email protected]>
20
 */
21
class HtmlServiceProvider extends \Collective\Html\HtmlServiceProvider
22
{
23
    /**
24
     * Register the HTML builder instance.
25
     */
26 63
    protected function registerHtmlBuilder()
27
    {
28
        $this->app->bindShared('html', function ($app) {
29 63
            return new Html\HtmlBuilder($app['url']);
30 63
        });
31 63
    }
32
33
    /**
34
     * Register the form builder instance.
35
     */
36
    protected function registerFormBuilder()
37
    {
38 63
        $this->app->bindShared('form', function ($app) {
39 48
            return new Html\FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
40 63
        });
41 63
    }
42
}
43