Completed
Push — master ( dda990...bade66 )
by Nathan
07:38
created

EasyHtmlElementServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace NatePage\EasyHtmlElement\Bridge\Laravel;
4
5
use Illuminate\Support\ServiceProvider;
6
use NatePage\EasyHtmlElement\HtmlElement;
7
8
class EasyHtmlElementServiceProvider extends ServiceProvider
9
{
10
    const CONFIG_PATH = __DIR__.'/config/easy_html_element.php';
11
12
    protected $defer = true;
13
14
    public function register(){
15
        $this->mergeConfigFrom(self::CONFIG_PATH, 'easy_html_element');
16
17
        $this->app->singleton(HtmlElement::class, function(){
18
            return new HtmlElement(config('easy_html_element.map'));
19
        });
20
    }
21
22
    public function boot()
23
    {
24
        $this->publishes([self::CONFIG_PATH => config_path('easy_html_element.php')]);
25
    }
26
27
    public function provides()
28
    {
29
        return [HtmlElement::class];
30
    }
31
}
32