Code Duplication    Length = 19-19 lines in 2 locations

src/DB/DirectoryCreator.php 2 locations

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