mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 07:28:41 +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
|
public static function isOdd($a) : bool
|
||||||
{
|
{
|
||||||
if ($a & 1) {
|
return $a & 1;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -258,11 +254,7 @@ class Functions
|
||||||
*/
|
*/
|
||||||
public static function isEven($a) : bool
|
public static function isEven($a) : bool
|
||||||
{
|
{
|
||||||
if ($a & 1) {
|
return !($a & 1)
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user