RobotsServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 2
b 0
f 0
dl 0
loc 30
ccs 5
cts 7
cp 0.7143
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A provides() 0 3 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 36
    public function register()
22
    {
23
        $this->app->bind('robots', function () {
24 36
            return new Robots;
25 36
        });
26 36
        $this->app->alias('robots', Robots::class);
27 36
    }
28
29
    /**
30
     * Get the services provided by the provider.
31
     *
32
     * @return array
33
     */
34
    public function provides()
35
    {
36
        return [Robots::class, 'robots'];
37
    }
38
}
39