@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $top = count($labels) >= 2 ? array_pop($labels) : ''; |
54 | 54 | $second = array_pop($labels); |
55 | 55 | |
56 | - $hostname = $second . '.' . $top; |
|
56 | + $hostname = $second.'.'.$top; |
|
57 | 57 | $responses = dns_get_record($hostname, DNS_SOA); |
58 | 58 | |
59 | 59 | if ($responses === false || count($responses) === 0) { |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | public function addDnsPinning() { |
107 | - return function (callable $handler) { |
|
108 | - return function ( |
|
107 | + return function(callable $handler) { |
|
108 | + return function( |
|
109 | 109 | RequestInterface $request, |
110 | 110 | array $options |
111 | 111 | ) use ($handler) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return $handler($request, $options); |
114 | 114 | } |
115 | 115 | |
116 | - $hostName = (string)$request->getUri()->getHost(); |
|
116 | + $hostName = (string) $request->getUri()->getHost(); |
|
117 | 117 | $port = $request->getUri()->getPort(); |
118 | 118 | |
119 | 119 | $ports = [ |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ]; |
123 | 123 | |
124 | 124 | if ($port !== null) { |
125 | - $ports[] = (string)$port; |
|
125 | + $ports[] = (string) $port; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | $targetIps = $this->dnsResolve($hostName, 0); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | // Coalesce the per-host:port ips back into a comma separated list |
142 | 142 | foreach ($curlResolves as $hostport => $ips) { |
143 | - $options['curl'][CURLOPT_RESOLVE][] = "$hostport:" . implode(',', $ips); |
|
143 | + $options['curl'][CURLOPT_RESOLVE][] = "$hostport:".implode(',', $ips); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return $handler($request, $options); |