| 1 | <?php |
||
| 11 | class FileReaderProxy implements IFileReader, IProxy |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var IFileReader |
||
| 15 | */ |
||
| 16 | private $fileReader; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var FileReaderCache |
||
| 20 | */ |
||
| 21 | private $cache; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var bool |
||
| 25 | */ |
||
| 26 | private $isCached = false; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var bool |
||
| 30 | */ |
||
| 31 | private $hasChanged = false; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param IFileReader $fileReader |
||
| 35 | * @param FileReaderCache $cache |
||
| 36 | */ |
||
| 37 | public function __construct(IFileReader $fileReader, FileReaderCache $cache) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return mixed |
||
| 45 | */ |
||
| 46 | public function read() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param mixed $data |
||
| 57 | * @param int $mode |
||
| 58 | * @return int |
||
| 59 | */ |
||
| 60 | public function write($data, $mode = 0) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function flush() |
||
| 77 | |||
| 78 | /** |
||
| 79 | * |
||
| 80 | */ |
||
| 81 | public function clear() |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return int |
||
|
|
|||
| 89 | */ |
||
| 90 | public function invalidate() |
||
| 94 | } |
||
| 95 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.