diff options
author | Faraz Samapoor <f.samapoor@gmail.com> | 2023-06-26 15:20:56 +0330 |
---|---|---|
committer | Faraz Samapoor <fsa@adlas.at> | 2023-09-21 11:20:12 +0330 |
commit | 4f46656d397858265609b68ab2b51c1a2a7e7772 (patch) | |
tree | 138815f2a9acbceca801296ddecea184f105c90d /lib/private/Security/TrustedDomainHelper.php | |
parent | d6445254ac8d54b746a45905cfba7ceade858d86 (diff) | |
download | nextcloud-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/TrustedDomainHelper.php')
-rw-r--r-- | lib/private/Security/TrustedDomainHelper.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php index ca6a5cba073..e91f230a9c9 100644 --- a/lib/private/Security/TrustedDomainHelper.php +++ b/lib/private/Security/TrustedDomainHelper.php @@ -34,19 +34,13 @@ use OCP\IConfig; use OCP\Security\ITrustedDomainHelper; class TrustedDomainHelper implements ITrustedDomainHelper { - /** @var IConfig */ - private $config; - - /** - * @param IConfig $config - */ - public function __construct(IConfig $config) { - $this->config = $config; + public function __construct( + private IConfig $config, + ) { } /** * Strips a potential port from a domain (in format domain:port) - * @param string $host * @return string $host without appended port */ private function getDomainWithoutPort(string $host): string { |