Completed
Push — master ( 14ba24...aa562b )
by Ari
01:11
created

IftttWebhookServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 28
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 Arimolzer\IftttWebhook;
4
5
use Arimolzer\IftttWebhook\Facade\IftttWebhook;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Class IftttWebhookServiceProvider
10
 * @package Arimolzer\IftttWebhook
11
 */
12
class IftttWebhookServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * Bootstrap the application services.
16
     */
17
    public function boot()
18
    {
19
        if ($this->app->runningInConsole()) {
20
            $this->publishes([
21
                __DIR__.'/../config/config.php' => config_path('ifttt-webhook.php'),
22
            ], 'config');
23
        }
24
    }
25
26
    /**
27
     * Register the application services.
28
     */
29
    public function register()
30
    {
31
        // Automatically apply the package configuration
32
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'ifttt-webhook');
33
34
        // Register the main class to use with the facade
35
        $this->app->singleton('IftttWebhook', function () {
36
            return new IftttWebhook;
37
        });
38
    }
39
}
40