1 | <?php |
||
17 | class File implements WatcherInterface |
||
18 | { |
||
19 | /** |
||
20 | * Files. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $files; |
||
25 | |||
26 | /** |
||
27 | * File constructor. |
||
28 | * |
||
29 | * @param string|array $files |
||
|
|||
30 | */ |
||
31 | public function __construct($files = null) |
||
43 | |||
44 | /** |
||
45 | * Add file path. |
||
46 | * |
||
47 | * @param string $file |
||
48 | * |
||
49 | * @return $this |
||
50 | */ |
||
51 | public function addFile($file) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | * |
||
63 | * @throws \RuntimeException |
||
64 | */ |
||
65 | public function isActive() |
||
81 | } |
||
82 |
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. In addition it looks for parameters that have the generic type
array
and suggests a stricter type likearray<String>
.Most often this is a case of a parameter that can be null in addition to its declared types.