/**
  * Generated from @assert (102943875019273091740987023948) === FALSE.
  */
 public function testIsDigits3()
 {
     $this->assertSame(FALSE, Inspekt::isDigits(1.0294387501927309E+29));
 }
Exemple #2
0
 /**
  * Returns value if every character is a digit, FALSE otherwise.
  * This is just like isInt(), except there is no upper limit.
  *
  * @param mixed $key
  * @return mixed
  *
  * @tag validator
  */
 function testDigits($key)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Inspekt::isDigits($this->_getValue($key))) {
         return $this->_getValue($key);
     }
     return FALSE;
 }
Exemple #3
0
 /**
  * Returns value if every character is a digit, FALSE otherwise.
  * This is just like isInt(), except there is no upper limit.
  *
  * @param mixed $key
  * @return mixed
  * @throws Exception
  * @tag validator
  */
 public function testDigits($key)
 {
     $value = $this->getValueOrNull($key);
     if (!is_null($value) && Inspekt::isDigits($value)) {
         return $value;
     }
     return false;
 }