Code Duplication    Length = 16-21 lines in 2 locations

Lib/Slime/Console/Commands/CreateMigrationCommand.php 1 location

@@ 41-61 (lines=21) @@
38
        return $this->filePath;
39
    }
40
41
    protected function getStub()
42
    {
43
        return PHP_EOL . 'class ' .
44
        $this->getIncrementalFileName() .
45
        ' implements DbHelperInterface {'
46
        . PHP_EOL
47
        . '
48
        public function run()
49
        {
50
        $tableName = \'table_name\';
51
        Capsule::schema()->dropIfExists($tableName);
52
        Capsule::schema()->create($tableName, function (Blueprint $table) {
53
            $table->increments(\'id\');
54
            $table->string(\'name\');
55
            $table->timestamps();
56
        });
57
        }
58
        '
59
        . PHP_EOL
60
        . '}';
61
    }
62
63
    protected function getIncrementalFileName()
64
    {

Lib/Slime/Console/Commands/CreateSeederCommand.php 1 location

@@ 22-37 (lines=16) @@
19
        return $fileHead;
20
    }
21
22
    protected function getStub()
23
    {
24
        return PHP_EOL . 'class ' .
25
        $this->getIncrementalFileName() .
26
        ' implements DbHelperInterface {'
27
        . PHP_EOL
28
        . '
29
        public function run()
30
        {
31
        $faker = Faker\Factory::create();
32
        
33
        }
34
        '
35
        . PHP_EOL
36
        . '}';
37
    }
38
}