1 | <?php |
||
11 | class Json implements IFileReader |
||
12 | { |
||
13 | /** |
||
14 | * @var IFileReader |
||
15 | */ |
||
16 | private $fileReader; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $flags; |
||
22 | |||
23 | /** |
||
24 | * @param IFileReader $fileReader |
||
25 | * @param int $flags |
||
|
|||
26 | */ |
||
27 | public function __construct(IFileReader $fileReader, $flags = null) |
||
32 | |||
33 | /** |
||
34 | * @return array|null |
||
35 | */ |
||
36 | public function read() |
||
40 | |||
41 | /** |
||
42 | * @param mixed $data |
||
43 | * @param int $mode |
||
44 | * @return int |
||
45 | */ |
||
46 | public function write($data, $mode = 0) |
||
50 | |||
51 | /** |
||
52 | * @param $flags |
||
53 | */ |
||
54 | private function initFlags($flags) |
||
62 | } |
||
63 |
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.