BBCodeParserServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php namespace ivuorinen\BBCode;
2
3
use Illuminate\Support\ServiceProvider;
4
5
class BBCodeParserServiceProvider extends ServiceProvider
6
{
7
8
    /**
9
     * Indicates if loading of the provider is deferred.
10
     *
11
     * @var bool
12
     */
13
    protected $defer = true;
14
15
    /**
16
     * Register the service provider.
17
     *
18
     * @return void
19
     */
20 14
    public function register()
21
    {
22 14
        $this->app->bind('bbcode', function () {
23 1
            return new BBCodeParser;
24 14
        });
25
    }
26
27
    /**
28
     * Get the services provided by the provider.
29
     *
30
     * @return array
31
     */
32 1
    public function provides()
33
    {
34 1
        return ['bbcode'];
35
    }
36
}
37