1 | <?php |
||
12 | class ConnectionParams |
||
13 | { |
||
14 | protected $defaultUserAgent = 'bitcoin-php'; |
||
15 | protected $defaultProtocolVersion = '70000'; |
||
16 | protected $defaultTxRelay = false; |
||
17 | protected $defaultBlockHeight = '0'; |
||
18 | protected $defaultLocalIp = '0.0.0.0'; |
||
19 | protected $defaultLocalPort = '0'; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $protocolVersion; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $timestamp; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $txRelay; |
||
35 | |||
36 | /** |
||
37 | * @var callable |
||
38 | */ |
||
39 | private $bestBlockHeightCallback; |
||
40 | |||
41 | /** |
||
42 | * @var int |
||
43 | */ |
||
44 | private $bestBlockHeight; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | private $localIp; |
||
50 | |||
51 | /** |
||
52 | * @var int |
||
53 | */ |
||
54 | private $localPort; |
||
55 | |||
56 | /** |
||
57 | * @var int |
||
58 | */ |
||
59 | private $localServices; |
||
60 | |||
61 | /** |
||
62 | * @var string |
||
63 | */ |
||
64 | private $userAgent; |
||
65 | |||
66 | /** |
||
67 | * @param bool $optRelay |
||
68 | * @return $this |
||
69 | */ |
||
70 | 6 | public function requestTxRelay($optRelay = true) |
|
79 | |||
80 | /** |
||
81 | * @param int $blockHeight |
||
82 | * @return $this |
||
83 | */ |
||
84 | 3 | public function setBestBlockHeight($blockHeight) |
|
89 | |||
90 | /** |
||
91 | * @param callable $callable |
||
92 | * @return $this |
||
93 | */ |
||
94 | 3 | public function setBestBlockHeightCallback(callable $callable) |
|
99 | |||
100 | /** |
||
101 | * @param int $version |
||
102 | * @return $this |
||
103 | */ |
||
104 | 3 | public function setProtocolVersion($version) |
|
109 | |||
110 | /** |
||
111 | * @param string $ip |
||
112 | * @return $this |
||
113 | */ |
||
114 | 6 | public function setLocalIp($ip) |
|
119 | |||
120 | /** |
||
121 | * @param int $port |
||
122 | * @return $this |
||
123 | */ |
||
124 | 6 | public function setLocalPort($port) |
|
129 | |||
130 | /** |
||
131 | * @param int $services |
||
132 | * @return $this |
||
133 | */ |
||
134 | 6 | public function setLocalServices($services) |
|
139 | |||
140 | /** |
||
141 | * @param NetworkAddressInterface $networkAddress |
||
142 | * @return $this |
||
143 | */ |
||
144 | 3 | public function setLocalNetAddr(NetworkAddressInterface $networkAddress) |
|
151 | |||
152 | /** |
||
153 | * @param int $timestamp |
||
154 | * @return $this |
||
155 | */ |
||
156 | 3 | public function setTimestamp($timestamp) |
|
161 | |||
162 | /** |
||
163 | * @param $string |
||
164 | * @return $this |
||
165 | */ |
||
166 | 6 | public function setUserAgent($string) |
|
175 | |||
176 | /** |
||
177 | * @param MsgFactory $messageFactory |
||
178 | * @param NetworkAddressInterface $remoteAddress |
||
179 | * @return Version |
||
180 | */ |
||
181 | 45 | public function produceVersion(MsgFactory $messageFactory, NetworkAddressInterface $remoteAddress) |
|
207 | } |
||
208 |
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..