Example #1
0
 /**
  * Checks if value is an integer
  *
  * @param   mixed       $value          Value to evaluate
  * @param   array       $requirements   Array of constraints (OPTIONAL)
  * @return  integer     Cleared value
  * @throws  InvalidDataException        If the value is not integer or fails constraints checks
  */
 public static function checkInteger($value, array $requirements = array())
 {
     return IntegerType::check($value, $requirements);
 }
Example #2
0
 public function testIsFail()
 {
     $expected = 'abc';
     $this->assertFalse(IntegerType::is($expected));
 }