Passed
Push — master ( b780d7...bdd28a )
by Basenko
02:50
created

RobotsServiceProvider::provides()   A

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