1 | <?php |
||
22 | class Response extends AbstractFrame |
||
23 | { |
||
24 | /** |
||
25 | * Get Results from response frame |
||
26 | * |
||
27 | * @return Result[] |
||
28 | */ |
||
29 | public function results() |
||
39 | |||
40 | /** |
||
41 | * Whether response is successful |
||
42 | * |
||
43 | * @todo On response with multiple codes this fails miserably |
||
44 | * |
||
45 | * @return bool true on succes, false otherwise. |
||
46 | */ |
||
47 | public function success() |
||
56 | |||
57 | /** |
||
58 | * Get Response code |
||
59 | * |
||
60 | * @todo on response with multiple results this fails miserably |
||
61 | * |
||
62 | * @return int response code |
||
63 | */ |
||
64 | public function code() |
||
68 | |||
69 | /** |
||
70 | * Get Response message |
||
71 | * |
||
72 | * @todo check message against multiple responses |
||
73 | * |
||
74 | * @return string message |
||
75 | */ |
||
76 | public function message() |
||
80 | |||
81 | public function clientTransactionId() |
||
90 | |||
91 | public function serverTransactionId() |
||
100 | |||
101 | public function data() |
||
118 | } |
||
119 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.