| 1 | <?php |
||
| 12 | class FileReaderFactory implements IFileReaderFactory |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var bool |
||
| 16 | */ |
||
| 17 | private $useIncludePath; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var resource |
||
| 21 | */ |
||
| 22 | private $context; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param bool $useIncludePath |
||
| 26 | * @param resource $context |
||
|
|
|||
| 27 | */ |
||
| 28 | public function __construct($useIncludePath = false, $context = null) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param $filePath |
||
| 36 | * @return IFileReader |
||
| 37 | */ |
||
| 38 | public function create($filePath) |
||
| 42 | } |
||
| 43 |
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.