Code Duplication    Length = 19-19 lines in 2 locations

src/DB/DirectoryCreator.php 2 locations

@@ 33-51 (lines=19) @@
30
    /**
31
     * Create factory file stub.
32
     */
33
    protected function createFactoriesFile()
34
    {
35
        $path = $this->config->getFactoryDirectory('ModelFactory.php');
36
37
        if (!file_exists($path)) {
38
            $stub = file_get_contents(__DIR__.'/Stubs/factory.stub');
39
40
            $this->writeFile(
41
                $path,
42
                $stub
43
            );
44
45
            $this->output->writeInfo('Created ModelFactory file.');
46
47
            return true;
48
        }
49
50
        return false;
51
    }
52
53
    /**
54
     * Create seeder file stub.
@@ 56-74 (lines=19) @@
53
    /**
54
     * Create seeder file stub.
55
     */
56
    protected function createSeederFile()
57
    {
58
        $path = $this->config->getSeedDirectory('DatabaseSeeder.php');
59
60
        if (!file_exists($path)) {
61
            $stub = file_get_contents(__DIR__.'/Stubs/seeder.stub');
62
63
            $this->writeFile(
64
                $this->config->getSeedDirectory('DatabaseSeeder.php'),
65
                $stub
66
            );
67
68
            $this->output->writeInfo('Created DatabaseSeeder file.');
69
70
            return true;
71
        }
72
73
        return false;
74
    }
75
}
76