TecniRtmServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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