Passed
Push — refactor/improve-static-analys... ( efcf20...37f12c )
by Bas
03:04
created

MigrationCreator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 21
ccs 3
cts 5
cp 0.6
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stubPath() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LaravelFreelancerNL\Aranguent\Migrations;
6
7
use Illuminate\Database\Migrations\MigrationCreator as IlluminateMigrationCreator;
8
use Illuminate\Filesystem\Filesystem;
9
10
class MigrationCreator extends IlluminateMigrationCreator
11
{
12
    /**
13
     * Create a new migration creator instance.
14
     *
15
     * @param  string  $customStubPath
16
     */
17 310
    public function __construct(Filesystem $files, $customStubPath)
18
    {
19 310
        $this->files = $files;
20 310
        $this->customStubPath = $customStubPath;
21
    }
22
23
    /**
24
     * Get the path to the stubs.
25
     *
26
     * @return string
27
     */
28
    public function stubPath()
29
    {
30
        return __DIR__ . '/../../stubs';
31
    }
32
}
33