/** * Generated from @assert ('10,244,578,109.234451') === FALSE. */ public function testIsFloat3() { $this->assertSame(FALSE, Inspekt::isFloat('10,244,578,109.234451')); }
/** * Returns value if it is a valid float value, FALSE otherwise. * * @param mixed $key * @return mixed * * @tag validator */ function testFloat($key) { if (!$this->keyExists($key)) { return false; } if (Inspekt::isFloat($this->_getValue($key))) { return $this->_getValue($key); } return FALSE; }
/** * Returns value if it is a valid float value, FALSE otherwise. * * @param mixed $key * @return mixed * @throws Exception * @tag validator */ public function testFloat($key) { $value = $this->getValueOrNull($key); if (!is_null($value) && Inspekt::isFloat($value)) { return $value; } return false; }