Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 9 | public function makeDirectory(FileNode $file, $visibility = null) |
|
35 | { |
||
36 | 9 | $madeDirectory = $file->getFilesystem()->createDir($file->getDirectory(), [ |
|
37 | 9 | 'visibility' => $visibility ?: static::VISIBILITY_PUBLIC, |
|
38 | 9 | ]); |
|
39 | 9 | if (!$madeDirectory) { |
|
40 | 1 | throw new MakeDirectoryFailedException($file, error_get_last()['message']); |
|
41 | } |
||
42 | |||
43 | 8 | return $file; |
|
44 | } |
||
45 | } |
||
46 |
This check looks for
@param
annotations 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.