TecniRtmServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 28
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 2
A register() 0 10 1
1
<?php
2
3
namespace Andreshg112\TecniRtm;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class TecniRtmServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12 4
    public function boot()
13
    {
14 4
        if ($this->app->runningInConsole()) {
15 4
            $this->publishes([
16 4
                __DIR__ . '/../config/tecni-rtm.php' => config_path('tecni-rtm.php'),
17 4
            ], 'config');
18
        }
19 4
    }
20
21
    /**
22
     * Register the application services.
23
     */
24 4
    public function register()
25
    {
26
        // Automatically apply the package configuration
27 4
        $this->mergeConfigFrom(__DIR__ . '/../config/tecni-rtm.php', 'tecni-rtm');
28
29
        // Register the main class to use with the facade
30
        $this->app->singleton('tecni-rtm', function () {
31 2
            return new TecniRtm;
32 4
        });
33 4
    }
34
}
35