Passed
Push — master ( 3ac5cf...58dc7b )
by Stephen
02:38
created

AddressServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 9 2
1
<?php
2
3
namespace Sfneal\Address\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class AddressServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        // Publish migration file (if not already published)
12
        if (! class_exists('CreateAddressTable')) {
13
            $this->publishes([
14
                __DIR__.'/../database/migrations/create_address_table.php.stub' => database_path(
15
                    'migrations/'.date('Y_m_d_His', time()).'_create_address_table.php'
16
                ),
17
            ], 'migration');
18
        }
19
    }
20
}
21