/** * */ public function testIsLessThan() { $this->assertTrue(Inspekt::isLessThan('a', 'b')); }
/** * Returns value if it is less than $max, FALSE otherwise. * * @param mixed $key * @param mixed $max * @return mixed * * @tag validator */ function testLessThan($key, $max = NULL) { if (!$this->keyExists($key)) { return false; } if (Inspekt::isLessThan($this->_getValue($key), $max)) { return $this->_getValue($key); } return FALSE; }
/** * Returns value if it is less than $max, FALSE otherwise. * * @param mixed $key * @param mixed $max * @return mixed * @throws Exception * @tag validator */ public function testLessThan($key, $max = null) { $value = $this->getValueOrNull($key); if (!is_null($value) && Inspekt::isLessThan($value, $max)) { return $value; } return false; }