diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-11-22 17:36:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 17:36:26 +0100 |
commit | 19f41a60a0a61f8abb014a2062621819c71d79ac (patch) | |
tree | 94f5e54d76612881056bbe665ae805e76a5bfc0c /lib/private/Security | |
parent | f01ad7b8d811c72ecfcc9c99207ae8acc87ed40c (diff) | |
download | nextcloud-server-19f41a60a0a61f8abb014a2062621819c71d79ac.tar.gz nextcloud-server-19f41a60a0a61f8abb014a2062621819c71d79ac.zip |
Type hint in IpAddress
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Diffstat (limited to 'lib/private/Security')
-rw-r--r-- | lib/private/Security/Normalizer/IpAddress.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php index 2d5dea67af1..98d85ce07a1 100644 --- a/lib/private/Security/Normalizer/IpAddress.php +++ b/lib/private/Security/Normalizer/IpAddress.php @@ -96,10 +96,9 @@ class IpAddress { * Returns the IPv4 address embedded in an IPv6 if applicable. * The detected format is "::ffff:x.x.x.x" using the binary form. * - * @param string $ipv6 IPv6 string - * @return null|string embedded IPv4 string or null if none was found + * @return string|null embedded IPv4 string or null if none was found */ - private function getEmbeddedIpv4($ipv6) { + private function getEmbeddedIpv4(string $ipv6): ?string { $binary = inet_pton($ipv6); if (!$binary) { return null; |