SmsServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 12 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Odeen
5
 * Date: 2016/5/8
6
 * Time: 23:14.
7
 */
8
9
namespace Caikeal\LaravelSms\sms;
10
11
use Illuminate\Support\ServiceProvider;
12
13
class SmsServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Bootstrap any application services.
17
     *
18
     * @return void
19
     */
20
    public function boot()
21
    {
22
        $this->publishes([
23
            __DIR__.'/../config/sms.php' => config_path('sms.php'),
24
        ]);
25
    }
26
27
    /**
28
     * Register any application services.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->mergeConfigFrom(
35
            __DIR__.'/../config/sms.php', 'sms'
36
        );
37
38
        $this->app->singleton('Sms', function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
39
            $app = new Sms(config('sms.default'));
40
41
            return $app;
42
        });
43
    }
44
}
45