[add] Higher than zero asserting
This commit is contained in:
@@ -45,5 +45,16 @@ class Asserts{
|
||||
throw new Exception($errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $number integer
|
||||
* @param $errorMessage string
|
||||
* @throws Exception
|
||||
*/
|
||||
function higherThanZero($number, $errorMessage){
|
||||
if($number <= 0){
|
||||
throw new Exception($errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user