File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class DohExecutor implements ExecutorInterface {
5656 * @param string $method
5757 * @param ?LoopInterface $loop
5858 */
59- public function __construct (string $ nameserver , string $ method = self ::METHOD_GET , LoopInterface $ loop = null )
59+ public function __construct (string $ nameserver , string $ method = self ::METHOD_GET , ? LoopInterface $ loop = null )
6060 {
6161 if (!class_exists ('\React\Http\Browser ' )) {
6262 throw new RuntimeException ('DNS over HTTPS support requires reactphp/http library ' ); //@codeCoverageIgnore
@@ -150,18 +150,19 @@ private function getBrowser() : Promise\PromiseInterface {
150150 if ($ this ->ipv6address && self ::NEED_GH9356_IPV6_WORKAROUND ) {
151151 $ this ->initialiseIPv6Workaround ($ deferred );
152152 } else {
153- $ browser = ( new Browser (new Connector ([
153+ $ browser = new Browser (new Connector ([
154154 'tcp ' => [
155155 'tcp_nodelay ' => true ,
156156 ],
157157 ]
158- ), $ this ->loop )) ;
158+ ), $ this ->loop );
159159 $ deferred ->resolve ($ browser );
160160 }
161161 }
162162 return $ this ->browserResolution ;
163163 }
164164
165+ /** @codeCoverageIgnore */
165166 protected function initialiseIPv6Workaround (Deferred $ deferred ) : void {
166167 // Some versions of PHP do not validate IPv6 addresses contained in the SAN fields of a certificate
167168 // To support IPv6 we download the certificate on the first connect and manually verify our nameserver IPv6 IP
You can’t perform that action at this time.
0 commit comments