Passed
Push — master ( 85ec08...3ac5cf )
by Stephen
05:17 queued 02:45
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
4
namespace Sfneal\Address\Providers;
5
6
7
use Illuminate\Support\ServiceProvider;
8
9
class AddressServiceProvider extends ServiceProvider
10
{
11
    public function boot()
12
    {
13
        // Publish migration file (if not already published)
14
        if (! class_exists('CreateAddressTable')) {
15
            $this->publishes([
16
                __DIR__.'/../database/migrations/create_address_table.php.stub' => database_path(
17
                    'migrations/'.date('Y_m_d_His', time()).'_create_address_table.php'
18
                ),
19
            ], 'migration');
20
        }
21
    }
22
}
23