Skip to content

Commit

Permalink
Type hint in IpAddress
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Petry <vincent@nextcloud.com>

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
  • Loading branch information
2 people authored and backportbot[bot] committed Nov 23, 2021
1 parent cc0d104 commit 74eeca3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/private/Security/Normalizer/IpAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 74eeca3

Please sign in to comment.