From: Tim Düsterhus Date: Fri, 4 Jun 2021 11:27:57 +0000 (+0200) Subject: Rename `IpAddress::mask()` to `IpAddress::toMasked()` X-Git-Tag: 5.4.0_Beta_2~30^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2cb24f59e0329fab201dad814283d5247a92151;p=GitHub%2FWoltLab%2FWCF.git Rename `IpAddress::mask()` to `IpAddress::toMasked()` --- diff --git a/com.woltlab.wcf/templates/accountSecurity.tpl b/com.woltlab.wcf/templates/accountSecurity.tpl index 071203228d..4ab78ecb61 100644 --- a/com.woltlab.wcf/templates/accountSecurity.tpl +++ b/com.woltlab.wcf/templates/accountSecurity.tpl @@ -83,7 +83,7 @@
{if $session->isCurrentSession()}{lang}wcf.user.security.currentSession{/lang}{else}{@$session->getLastActivityTime()|time}{/if}
{lang}wcf.user.security.ipAddress{/lang}
-
{$session->getIpAddress()->mask(16, 48)}
+
{$session->getIpAddress()->toMasked(16, 48)}
diff --git a/wcfsetup/install/files/lib/util/IpAddress.class.php b/wcfsetup/install/files/lib/util/IpAddress.class.php index 061c2b8a6b..574fbafce5 100644 --- a/wcfsetup/install/files/lib/util/IpAddress.class.php +++ b/wcfsetup/install/files/lib/util/IpAddress.class.php @@ -80,7 +80,7 @@ final class IpAddress /** * Returns a new IP address with the last $maskX bits masked off. */ - public function mask(int $mask4, int $mask6): self + public function toMasked(int $mask4, int $mask6): self { if ($mask4 < 0 || $mask4 > 32) { throw new \InvalidArgumentException('Given $mask4 is not in the interval [0, 32].');