[add] Higher than zero asserting

This commit is contained in:
2018-08-09 23:26:25 -06:00
parent 112f78c1de
commit 1500aef977
2 changed files with 45 additions and 1 deletions

View File

@@ -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);
}
}
}
?>