mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Optimize function
This commit is contained in:
parent
ffa8d39031
commit
1c72b75fc3
|
|
@ -239,11 +239,7 @@ class Functions
|
|||
*/
|
||||
public static function isOdd($a) : bool
|
||||
{
|
||||
if ($a & 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return $a & 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -258,11 +254,7 @@ class Functions
|
|||
*/
|
||||
public static function isEven($a) : bool
|
||||
{
|
||||
if ($a & 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !($a & 1)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user