| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 18 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 20 | public function create($name)  | 
            ||
| 21 |     { | 
            ||
| 22 | $path = $this->config->getCommandsDirectory($name.'.php');  | 
            ||
| 23 | |||
| 24 |         if (!file_exists($path)) { | 
            ||
| 25 | $creator = new DirectoryCreator($this->output);  | 
            ||
| 26 | |||
| 27 | $creator->create(false, false);  | 
            ||
| 28 | |||
| 29 | $this->writeFile($path, $this->getStub($name));  | 
            ||
| 30 | |||
| 31 |             $this->output->writeInfo("Created command {$name}."); | 
            ||
| 32 | |||
| 33 | return $path;  | 
            ||
| 34 | }  | 
            ||
| 35 | |||
| 36 | throw WriteError::commandExists($name);  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 58 |