| 1 | <?php |
||
| 7 | class ReferencePoint |
||
| 8 | { |
||
| 9 | private $name; |
||
| 10 | |||
| 11 | private $bytes; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param string $name |
||
| 15 | * @param int $bytes |
||
| 16 | */ |
||
| 17 | 5 | public function __construct($name, $bytes) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | public function getName() |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return int |
||
| 33 | */ |
||
| 34 | 1 | public function getBytes() |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @return float |
||
|
|
|||
| 41 | */ |
||
| 42 | public function getKiloBytes() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param int $bytes |
||
| 49 | */ |
||
| 50 | public function addBytes($bytes) |
||
| 58 | } |
||
| 59 |
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.