aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-07-08 15:00:09 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2025-07-09 14:42:58 +0200
commit5b96cca038dbe93568fd6c4c342475195a12169b (patch)
treef45eaac5453753ee663eecc84095a4597f06d9fc
parent07825883b009dca92d077aa0c458ae0ae4f8ef33 (diff)
downloadnextcloud-server-chore/update-guzzle7.tar.gz
nextcloud-server-chore/update-guzzle7.zip
chore(Http\Client): fix linting issueschore/update-guzzle7
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--lib/private/Http/Client/DnsPinMiddleware.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php
index 630d2c8e9f1..96e0f71adbe 100644
--- a/lib/private/Http/Client/DnsPinMiddleware.php
+++ b/lib/private/Http/Client/DnsPinMiddleware.php
@@ -13,23 +13,15 @@ use OCP\Http\Client\LocalServerException;
use Psr\Http\Message\RequestInterface;
class DnsPinMiddleware {
- /** @var NegativeDnsCache */
- private $negativeDnsCache;
- private IpAddressClassifier $ipAddressClassifier;
public function __construct(
- NegativeDnsCache $negativeDnsCache,
- IpAddressClassifier $ipAddressClassifier,
+ private NegativeDnsCache $negativeDnsCache,
+ private IpAddressClassifier $ipAddressClassifier,
) {
- $this->negativeDnsCache = $negativeDnsCache;
- $this->ipAddressClassifier = $ipAddressClassifier;
}
/**
* Fetch soa record for a target
- *
- * @param string $target
- * @return array|null
*/
private function soaRecord(string $target): ?array {
$labels = explode('.', $target);
@@ -99,7 +91,7 @@ class DnsPinMiddleware {
return \dns_get_record($hostname, $type);
}
- public function addDnsPinning() {
+ public function addDnsPinning(): callable {
return function (callable $handler) {
return function (
RequestInterface $request,
@@ -109,7 +101,7 @@ class DnsPinMiddleware {
return $handler($request, $options);
}
- $hostName = (string)$request->getUri()->getHost();
+ $hostName = $request->getUri()->getHost();
$port = $request->getUri()->getPort();
$ports = [