Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 12 |
Ratio | 63.16 % |
Changes | 0 |
1 | <?php |
||
19 | public function create($name) |
||
20 | { |
||
21 | $path = $this->config->getSeedDirectory($name.'.php'); |
||
22 | |||
23 | View Code Duplication | if (!file_exists($path)) { |
|
24 | $this->makeDirectoryStructure([ |
||
25 | 'database' => $this->config->getDatabaseDirectory(), |
||
26 | 'seeds' => $this->config->getSeedDirectory(), |
||
27 | ], $this->output); |
||
28 | |||
29 | $this->writeFile($path, $this->getStub($name)); |
||
30 | |||
31 | $this->output->writeInfo("Created seeder {$name}."); |
||
32 | |||
33 | return $path; |
||
34 | } |
||
35 | |||
36 | throw WriteError::commandExists($name); |
||
37 | } |
||
38 | |||
53 |