Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
21 | interface InputStream |
||
22 | { |
||
23 | /** |
||
24 | * Reads the given amount of characters from the stream. |
||
25 | * |
||
26 | * @param int $length The number of characters to read. |
||
27 | * |
||
28 | * @return string The characters read from the stream. |
||
29 | * |
||
30 | * @throws IOException If reading fails or if the stream is closed. |
||
31 | */ |
||
32 | public function read($length); |
||
33 | |||
34 | /** |
||
35 | * Reads a line from the stream. |
||
36 | * |
||
37 | * @param int $length The maximum number of characters to read. If `null`, |
||
|
|||
38 | * all characters up to the first newline are returned. |
||
39 | * |
||
40 | * @return string The characters read from the stream. |
||
41 | * |
||
42 | * @throws IOException If reading fails or if the stream is closed. |
||
43 | */ |
||
44 | public function readLine($length = null); |
||
45 | |||
46 | /** |
||
47 | * Closes the stream. |
||
48 | */ |
||
49 | public function close(); |
||
50 | |||
51 | /** |
||
52 | * Returns whether the stream is closed. |
||
53 | * |
||
54 | * @return bool Returns `true` if the stream is closed. |
||
55 | */ |
||
56 | public function isClosed(); |
||
57 | } |
||
58 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.