1 | <?php |
||
23 | class ReadStatus |
||
24 | { |
||
25 | private $readStatus; |
||
26 | |||
27 | /** |
||
28 | * Constructor. |
||
29 | * |
||
30 | * @param integer $readStatus |
||
31 | */ |
||
32 | public function __construct($readStatus) |
||
38 | |||
39 | /** |
||
40 | * Returns the read status of a message |
||
41 | * |
||
42 | * @return integer The read status of a message |
||
43 | */ |
||
44 | public function getReadStatus() |
||
48 | |||
49 | /** |
||
50 | * Checks if the given read status is a valid read status. |
||
51 | * |
||
52 | * @param mixed $readStatus The read status we check |
||
53 | * |
||
54 | * @return true if the read status is valid. |
||
|
|||
55 | * |
||
56 | * @throws \InvalidArgumentException If the read status is invalid. |
||
57 | */ |
||
58 | protected function isValidReadStatus($readStatus) |
||
75 | } |
||
76 |
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.