mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
src: style sweep
This commit is contained in:
parent
09d782f8f5
commit
5dd573b6e4
@ -225,11 +225,11 @@ class Util
|
||||
*/
|
||||
private static function getservbyname($service, $protocol)
|
||||
{
|
||||
if (!isset(self::$servbynames[$protocol])){
|
||||
if (!isset(self::$servbynames[$protocol])) {
|
||||
self::$servbynames[$protocol] = [];
|
||||
}
|
||||
if (!isset(self::$servbynames[$protocol][$service])) {
|
||||
self::$servbynames[$protocol][$service] = getservbyname($service, $protocol);
|
||||
self::$servbynames[$protocol][$service] = getservbyname($service, $protocol);
|
||||
}
|
||||
return self::$servbynames[$protocol][$service];
|
||||
}
|
||||
@ -244,7 +244,8 @@ class Util
|
||||
{
|
||||
$tmp = explode(':', $number);
|
||||
foreach ($tmp as $port) {
|
||||
if ((filter_var($port, FILTER_VALIDATE_INT, array(
|
||||
if (
|
||||
(filter_var($port, FILTER_VALIDATE_INT, array(
|
||||
"options" => array("min_range" => 1, "max_range" => 65535))) === false || !ctype_digit($port)) &&
|
||||
!self::getservbyname($port, "tcp") && !self::getservbyname($port, "udp")
|
||||
) {
|
||||
|
||||
@ -216,7 +216,7 @@ class Alias extends BaseModel
|
||||
if ($uuid === false) {
|
||||
return null;
|
||||
}
|
||||
$alias = $this->getNodeByReference("aliases.alias.".$uuid);
|
||||
$alias = $this->getNodeByReference('aliases.alias.' . $uuid);
|
||||
if ($alias != null && (string)$alias->name == $name) {
|
||||
return $alias;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user