mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
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>
This commit is contained in:
parent
cc0d10435b
commit
74eeca32ee
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue