| Conditions | 4 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public static function create($path, $permissions = 0755) { |
||
| 46 | if (file_exists($path) && !is_dir($path)) { |
||
| 47 | throw new FilesystemException("A file already exists in the location of [$path]"); |
||
| 48 | } |
||
| 49 | if (!file_exists($path)) { |
||
| 50 | mkdir($path, $permissions, true); |
||
| 51 | } |
||
| 52 | return new Directory($path); |
||
| 53 | } |
||
| 54 | |||
| 68 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.