Rename `IpAddress::mask()` to `IpAddress::toMasked()`
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 4 Jun 2021 11:27:57 +0000 (13:27 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 4 Jun 2021 11:53:47 +0000 (13:53 +0200)
com.woltlab.wcf/templates/accountSecurity.tpl
wcfsetup/install/files/lib/util/IpAddress.class.php

index 071203228d88070d5bcb1ae5d7e7bbd79bed29cc..4ab78ecb6113ca81e489aa43002b1244b6548011 100644 (file)
@@ -83,7 +83,7 @@
                                                        <dd>{if $session->isCurrentSession()}{lang}wcf.user.security.currentSession{/lang}{else}{@$session->getLastActivityTime()|time}{/if}</dd>
                                                        
                                                        <dt>{lang}wcf.user.security.ipAddress{/lang}</dt>
-                                                       <dd title="{$session->getIpAddress()}">{$session->getIpAddress()->mask(16, 48)}</dd>
+                                                       <dd title="{$session->getIpAddress()}">{$session->getIpAddress()->toMasked(16, 48)}</dd>
                                                </dl>
                                        </div>
                                        
index 061c2b8a6bd2646d21dbdad3b309613f88953b34..574fbafce5ff5063f4cac9fd5eeda92e4e6160f4 100644 (file)
@@ -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].');