Beispiel #1
0
 static function unless($condition, \Closure $callback)
 {
     if (Is::false($condition)) {
         return $callback();
     }
     return null;
 }
Beispiel #2
0
 static function when($condition, \Exception $exception)
 {
     if (Is::true($condition)) {
         throw $exception;
     }
 }
Beispiel #3
0
 static function number($number)
 {
     return !Is::number($number);
 }