1 | <?php |
||
23 | class TcpWorker implements WorkerInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var TcpTunnel |
||
27 | */ |
||
28 | protected $tunnel; |
||
29 | |||
30 | /** |
||
31 | * @var Client |
||
32 | */ |
||
33 | protected $client; |
||
34 | |||
35 | /** |
||
36 | * @var ConnectionInterface |
||
37 | */ |
||
38 | protected $proxyConnection; |
||
39 | |||
40 | /** |
||
41 | * @var ConnectionInterface |
||
42 | */ |
||
43 | protected $localConnection; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $publicConnectionId; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $initBuffer; |
||
54 | |||
55 | public function __construct(Client $client, TunnelInterface $tunnel, $publicConnectionId) |
||
61 | |||
62 | /** |
||
63 | * @codeCoverageIgnore |
||
64 | */ |
||
65 | public function start() |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function resolveTargetHost() |
||
79 | |||
80 | /** |
||
81 | * Handles the proxy connection. |
||
82 | * |
||
83 | * @param ConnectionInterface $connection |
||
84 | * @codeCoverageIgnore |
||
85 | */ |
||
86 | public function handleProxyConnection(ConnectionInterface $connection) |
||
108 | |||
109 | /** |
||
110 | * Connect the local server. |
||
111 | * |
||
112 | * @param string $address |
||
113 | * @codeCoverageIgnore |
||
114 | */ |
||
115 | protected function connectLocalHost($address) |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | * |
||
126 | * @codeCoverageIgnore |
||
127 | */ |
||
128 | public function handleLocalConnection(ConnectionInterface $localConnection) |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function handleConnectLocalError(\Exception $exception) |
||
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | public function stop() |
||
171 | |||
172 | /** |
||
173 | * {@inheritdoc} |
||
174 | */ |
||
175 | public function getTunnel() |
||
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | public static function support(TunnelInterface $tunnel) |
||
187 | } |
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.