Passed
Push — master ( 611578...f9e565 )
by Stephen
02:59 queued 11s
created

MockModelsServiceProvider::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
namespace Sfneal\Testing\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class MockModelsServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        // Publish migration file (if not already published)
12
        if (! class_exists('CreatePeopleTable')) {
13
            $this->publishes([
14
                __DIR__.'/../database/migrations/create_people_table.php.stub' => database_path(
15
                    'migrations/'.date('Y_m_d_His', time()).'_create_people_table.php'
16
                ),
17
            ], 'migration');
18
        }
19
    }
20
}
21