1 | <?php |
||
31 | final class Flow implements Mqtt\Flow |
||
32 | { |
||
33 | /** |
||
34 | * @var Flow |
||
35 | */ |
||
36 | private $decorated; |
||
37 | |||
38 | /** |
||
39 | * @var Promise\Deferred |
||
40 | */ |
||
41 | private $deferred; |
||
42 | |||
43 | /** |
||
44 | * @var Mqtt\Packet |
||
45 | */ |
||
46 | private $packet; |
||
47 | |||
48 | /** |
||
49 | * @var bool |
||
50 | */ |
||
51 | private $isSilent; |
||
52 | |||
53 | /** |
||
54 | * Constructs an instance of this class. |
||
55 | * |
||
56 | * @param Mqtt\Flow $decorated |
||
57 | * @param Promise\Deferred $deferred |
||
58 | * @param Mqtt\Packet $packet |
||
59 | * @param bool $isSilent |
||
60 | */ |
||
61 | public function __construct( |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function getCode() |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function start() |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function accept(Mqtt\Packet $packet) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function next(Mqtt\Packet $packet) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function isFinished() |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public function isSuccess() |
||
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | public function getResult() |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function getErrorMessage() |
||
140 | |||
141 | /** |
||
142 | * Returns the associated deferred |
||
143 | * |
||
144 | * @return Promise\Deferred |
||
145 | */ |
||
146 | public function getDeferred() : Promise\Deferred |
||
150 | |||
151 | /** |
||
152 | * Returns the current packet |
||
153 | * |
||
154 | * @return Mqtt\Packet |
||
155 | */ |
||
156 | public function getPacket() : Mqtt\Packet |
||
160 | |||
161 | /** |
||
162 | * Indicates if the flow should emit events |
||
163 | * |
||
164 | * @return bool |
||
165 | */ |
||
166 | public function isSilent() : bool |
||
170 | } |
||
171 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.