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

HtmlServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 22
c 0
b 0
f 0
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerHtmlBuilder() 0 6 1
A registerFormBuilder() 0 6 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 \Illuminate\Html\HtmlServiceProvider
22
{
23
    /**
24
     * Register the HTML builder instance.
25
     */
26 60
    protected function registerHtmlBuilder()
27
    {
28
        $this->app->bindShared('html', function ($app) {
29 60
            return new Html\HtmlBuilder($app['url']);
30 60
        });
31 60
    }
32
33
    /**
34
     * Register the form builder instance.
35
     */
36
    protected function registerFormBuilder()
37
    {
38 60
        $this->app->bindShared('form', function ($app) {
39 45
            return new Html\FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
40 60
        });
41 60
    }
42
}
43