| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 9 | public function makeDirectory(FileNode $file, $visibility = null) |
|
| 24 | { |
||
| 25 | 9 | $madeDirectory = $file->getFilesystem()->createDir($file->getDirectory(), [ |
|
| 26 | 9 | 'visibility' => $visibility ?: static::VISIBILITY_PUBLIC, |
|
| 27 | ]); |
||
| 28 | 9 | if (!$madeDirectory) { |
|
| 29 | 1 | throw new MakeDirectoryFailedException($file, error_get_last()['message']); |
|
| 30 | } |
||
| 31 | |||
| 32 | 8 | return $file; |
|
| 33 | } |
||
| 34 | } |
||
| 35 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.