Apply fixes from StyleCI (#13201)

This commit is contained in:
Jellyfrog
2021-09-08 03:33:54 +02:00
committed by GitHub
parent f3b92ce313
commit 232b9a414c
3 changed files with 10 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ class IPv6 extends IP
foreach ($net_bytes as $index => $byte) {
$shift = min($cidr - 16 * ($index - 1), 16);
if ($shift > 0) {
$mask = ~(0xffff >> $shift) & 0xffff;
$mask = ~(0xFFFF >> $shift) & 0xFFFF;
$net_bytes[$index] = $byte & $mask;
} else {
$net_bytes[$index] = 0;
@@ -134,7 +134,7 @@ class IPv6 extends IP
for ($index = 1; $index <= 8; $index++) {
$shift = $cidr - 16 * ($index - 1);
if ($shift > 0) {
$mask = ~(0xffff >> $shift) & 0xffff;
$mask = ~(0xFFFF >> $shift) & 0xFFFF;
if (($net_bytes[$index] & $mask) != ($ip_bytes[$index] & $mask)) {
return false;
}