| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function create($name) |
||
| 41 | { |
||
| 42 | if (class_exists($name)) { |
||
| 43 | throw WriteError::classExists($name); |
||
| 44 | } |
||
| 45 | |||
| 46 | $commandsDir = $this->config->getCommandsDirectory(); |
||
| 47 | |||
| 48 | $this->makeDirectoryStructure([$commandsDir]); |
||
| 49 | |||
| 50 | $this->writeFile( |
||
| 51 | $path = $commandsDir.$name.'.php', |
||
| 52 | $this->getStub($name) |
||
| 53 | ); |
||
| 54 | |||
| 55 | $this->output->writeInfo("Successfully created command {$name}."); |
||
| 56 | |||
| 57 | return $path; |
||
| 58 | } |
||
| 59 | |||
| 74 |