Completed
Push — master ( e68441...354a44 )
by Vincenzo
02:20
created

CreateSeederCommand::getHead()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
4
namespace App\Lib\Slime\Console\Commands;
5
6
7
class CreateSeederCommand extends CreateMigrationCommand
8
{
9
    protected $prefix = 'S'; //stands for seeder
10
    protected $filePath = 'database/seeds/';
11
12
    protected function getHead()
13
    {
14
        $fileHead = '<?php'
15
            . PHP_EOL
16
            . PHP_EOL
17
            . 'use App\Lib\Slime\Interfaces\DatabaseHelpers\DbHelperInterface;'
18
            . PHP_EOL;
19
        return $fileHead;
20
    }
21
22 View Code Duplication
    protected function getStub()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
}