aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/RemoteHostValidator.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-26 15:20:56 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-09-21 11:20:12 +0330
commit4f46656d397858265609b68ab2b51c1a2a7e7772 (patch)
tree138815f2a9acbceca801296ddecea184f105c90d /lib/private/Security/RemoteHostValidator.php
parentd6445254ac8d54b746a45905cfba7ceade858d86 (diff)
downloadnextcloud-server-4f46656d397858265609b68ab2b51c1a2a7e7772.tar.gz
nextcloud-server-4f46656d397858265609b68ab2b51c1a2a7e7772.zip
Refactors lib/private/Security.
Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'lib/private/Security/RemoteHostValidator.php')
-rw-r--r--lib/private/Security/RemoteHostValidator.php19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/private/Security/RemoteHostValidator.php b/lib/private/Security/RemoteHostValidator.php
index 38129fbd81b..385b38cff98 100644
--- a/lib/private/Security/RemoteHostValidator.php
+++ b/lib/private/Security/RemoteHostValidator.php
@@ -38,19 +38,12 @@ use function urldecode;
* @internal
*/
final class RemoteHostValidator implements IRemoteHostValidator {
- private IConfig $config;
- private HostnameClassifier $hostnameClassifier;
- private IpAddressClassifier $ipAddressClassifier;
- private LoggerInterface $logger;
-
- public function __construct(IConfig $config,
- HostnameClassifier $hostnameClassifier,
- IpAddressClassifier $ipAddressClassifier,
- LoggerInterface $logger) {
- $this->config = $config;
- $this->hostnameClassifier = $hostnameClassifier;
- $this->ipAddressClassifier = $ipAddressClassifier;
- $this->logger = $logger;
+ public function __construct(
+ private IConfig $config,
+ private HostnameClassifier $hostnameClassifier,
+ private IpAddressClassifier $ipAddressClassifier,
+ private LoggerInterface $logger,
+ ) {
}
public function isValid(string $host): bool {