From 74eeca32eea5983d460982c2d3473a6d3b687b98 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 22 Nov 2021 17:36:26 +0100 Subject: [PATCH] Type hint in IpAddress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vincent Petry Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> --- lib/private/Security/Normalizer/IpAddress.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php index 2d5dea67af143..98d85ce07a145 100644 --- a/lib/private/Security/Normalizer/IpAddress.php +++ b/lib/private/Security/Normalizer/IpAddress.php @@ -96,10 +96,9 @@ private function getIPv6Subnet(string $ip, int $maskBits = 48): string { * 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;