| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function new() |
||
| 23 | { |
||
| 24 | $userDocsetsDirectory = app_path() . '/../../../../app/Docsets'; |
||
| 25 | |||
| 26 | File::makeDirectory($userDocsetsDirectory, 0755, true, true); |
||
| 27 | |||
| 28 | if (! $this->docsetName) { |
||
| 29 | File::copy( |
||
| 30 | app_path() . '/Services/stubs/RickAstley.stub', |
||
| 31 | $userDocsetsDirectory . '/RickAstley.php' |
||
| 32 | ); |
||
| 33 | |||
| 34 | return true; |
||
| 35 | } |
||
| 36 | |||
| 37 | File::put( |
||
| 38 | $userDocsetsDirectory . '/' . Str::studly($this->docsetName) . '.php', |
||
| 39 | '<?php blah blah blah' |
||
| 40 | ); |
||
| 41 | |||
| 42 | return true; |
||
| 43 | } |
||
| 45 |