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

@@ -675,7 +675,7 @@ function match_network($nets, $ip, $first = false)
$ip_arr = explode('/', $net);
$net_long = ip2long($ip_arr[0]);
$x = ip2long($ip_arr[1]);
$mask = long2ip($x) == $ip_arr[1] ? $x : 0xffffffff << (32 - $ip_arr[1]);
$mask = long2ip($x) == $ip_arr[1] ? $x : 0xFFFFFFFF << (32 - $ip_arr[1]);
$ip_long = ip2long($ip);
if ($rev) {
if (($ip_long & $mask) == ($net_long & $mask)) {
@@ -1090,8 +1090,8 @@ function guidv4($data)
// From: Jack http://stackoverflow.com/users/1338292/ja%CD%A2ck
assert(strlen($data) == 16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
$data[6] = chr(ord($data[6]) & 0x0F | 0x40); // set version to 0100
$data[8] = chr(ord($data[8]) & 0x3F | 0x80); // set bits 6-7 to 10
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}