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