1 | <?php |
||
14 | class ConnectionParams |
||
15 | { |
||
16 | protected $defaultUserAgent = 'bitcoin-php'; |
||
17 | protected $defaultProtocolVersion = '70000'; |
||
18 | protected $defaultTxRelay = false; |
||
19 | protected $defaultBlockHeight = '0'; |
||
20 | protected $defaultLocalIp = '0.0.0.0'; |
||
21 | protected $defaultLocalPort = '0'; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $protocolVersion; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | private $timestamp; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | private $txRelay; |
||
37 | |||
38 | /** |
||
39 | * @var callable |
||
40 | */ |
||
41 | private $bestBlockHeightCallback; |
||
42 | |||
43 | /** |
||
44 | * @var int |
||
45 | */ |
||
46 | private $bestBlockHeight; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | private $localIp; |
||
52 | |||
53 | /** |
||
54 | * @var int |
||
55 | */ |
||
56 | private $localPort; |
||
57 | |||
58 | /** |
||
59 | * @var int |
||
60 | */ |
||
61 | private $localServices; |
||
62 | |||
63 | /** |
||
64 | * @var string |
||
65 | */ |
||
66 | private $userAgent; |
||
67 | |||
68 | /** |
||
69 | * @var int |
||
70 | */ |
||
71 | private $requiredServices = 0; |
||
72 | 6 | ||
73 | /** |
||
74 | 6 | * @param bool $optRelay |
|
75 | 3 | * @return $this |
|
76 | */ |
||
77 | public function requestTxRelay($optRelay = true) |
||
86 | 6 | ||
87 | /** |
||
88 | 6 | * @param int $blockHeight |
|
89 | 6 | * @return $this |
|
90 | */ |
||
91 | public function setBestBlockHeight($blockHeight) |
||
96 | 3 | ||
97 | /** |
||
98 | 3 | * @param callable $callable |
|
99 | 3 | * @return $this |
|
100 | */ |
||
101 | public function setBestBlockHeightCallback(callable $callable) |
||
106 | 3 | ||
107 | /** |
||
108 | 3 | * @param int $version |
|
109 | 3 | * @return $this |
|
110 | */ |
||
111 | public function setProtocolVersion($version) |
||
116 | 9 | ||
117 | /** |
||
118 | 9 | * @param IpInterface $ip |
|
119 | 9 | * @return $this |
|
120 | */ |
||
121 | public function setLocalIp(IpInterface $ip) |
||
126 | 6 | ||
127 | /** |
||
128 | 6 | * @param int $port |
|
129 | 6 | * @return $this |
|
130 | */ |
||
131 | public function setLocalPort($port) |
||
136 | 6 | ||
137 | /** |
||
138 | 6 | * @param int $services |
|
139 | 6 | * @return $this |
|
140 | */ |
||
141 | public function setLocalServices($services) |
||
146 | 3 | ||
147 | /** |
||
148 | 2 | * @param NetworkAddressInterface $networkAddress |
|
149 | 3 | * @return $this |
|
150 | 3 | */ |
|
151 | 3 | public function setLocalNetAddr(NetworkAddressInterface $networkAddress) |
|
158 | 3 | ||
159 | /** |
||
160 | 3 | * @param int $timestamp |
|
161 | 3 | * @return $this |
|
162 | */ |
||
163 | public function setTimestamp($timestamp) |
||
168 | 6 | ||
169 | /** |
||
170 | 6 | * @param int $services |
|
171 | 3 | * @return $this |
|
172 | */ |
||
173 | public function setRequiredServices($services) |
||
178 | |||
179 | /** |
||
180 | * @return int |
||
181 | */ |
||
182 | public function getRequiredServices() |
||
186 | 45 | ||
187 | 45 | /** |
|
188 | 45 | * @param string $string |
|
189 | 30 | * @return $this |
|
190 | 45 | */ |
|
191 | 45 | public function setUserAgent($string) |
|
200 | 6 | ||
201 | 4 | /** |
|
202 | 36 | * @param MsgFactory $messageFactory |
|
203 | * @param NetworkAddressInterface $remoteAddress |
||
204 | * @return Version |
||
205 | 45 | */ |
|
206 | public function produceVersion(MsgFactory $messageFactory, NetworkAddressInterface $remoteAddress) |
||
232 | } |
||
233 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..