1 | <?php |
||
13 | class Int extends Scalar |
||
14 | { |
||
15 | /** |
||
16 | * @var bool Whether field is signed. If so, value form stream will be casted to signed integer. |
||
17 | */ |
||
18 | protected $signed; |
||
19 | |||
20 | /** |
||
21 | * Getter for signed property. |
||
22 | * |
||
23 | * @return bool |
||
24 | */ |
||
25 | 20 | public function getSigned() |
|
29 | |||
30 | /** |
||
31 | * Setter for signed property. |
||
32 | * |
||
33 | * @param bool $signed |
||
34 | */ |
||
35 | 8 | public function setSigned($signed) |
|
39 | |||
40 | /** |
||
41 | * Read data from Stream and cast it to integer. |
||
42 | * |
||
43 | * @param AbstractStream $stream Stream from which read. |
||
44 | * @return int Result value. |
||
|
|||
45 | */ |
||
46 | 18 | public function read(AbstractStream $stream) |
|
50 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.