/** * Generated from @assert ('F6') === TRUE. */ public function testIsHex2() { $this->assertSame(TRUE, Inspekt::isHex('F6')); }
/** * Returns value if it is a valid hexadecimal format, FALSE * otherwise. * * @param mixed $key * @return mixed * * @tag validator */ function testHex($key) { if (!$this->keyExists($key)) { return false; } if (Inspekt::isHex($this->_getValue($key))) { return $this->_getValue($key); } return FALSE; }
/** * Returns value if it is a valid hexadecimal format, FALSE * otherwise. * * @param mixed $key * @return mixed * @throws Exception * @tag validator */ public function testHex($key) { $value = $this->getValueOrNull($key); if (!is_null($value) && Inspekt::isHex($value)) { return $value; } return false; }