src/Psecio/Iniscan/Rule.php
public function evaluate(array $ini)
	{
		$test = $this->getTest();
		$evalClass = "\\Psecio\\Iniscan\\Operation\\Operation".ucwords(strtolower($test->operation));

		if (!class_exists($evalClass)) {
			throw new \InvalidArgumentException('Invalid operation "'.$test->operation.'"');
		}
		$value = (isset($test->value)) ? $test->value : null;
		$this->setValue($value);

		$evalInstance = new $evalClass($this->getSection());

		if (isset($test->version) && !$this->isVersion($test->version)) {
			$this->na();
		} else {
			($evalInstance->execute($test->key, $value, $ini) === false)
				? $this->fail() : $this->pass();
		}
	}
public function evaluate(array $ini)
	{
		$test = $this->getTest();
		$evalClass = "\\Psecio\\Iniscan\\Operation\\Operation".ucwords(strtolower($test->operation));

		if (!class_exists($evalClass)) {
			throw new \InvalidArgumentException('Invalid operation "'.$test->operation.'"');
		}
		$value = (isset($test->value)) ? $test->value : null;
		$this->setValue($value);

		$evalInstance = new $evalClass($this->getSection());

		if (isset($test->version) && !$this->isVersion($test->version)) {
			$this->na();
		} else {
			($evalInstance->execute($test->key, $value, $ini) === false)
				? $this->fail() : $this->pass();
		}
	}
public function evaluate ( array $ ini ) { $ test = $ this -> getTest ( ) ; $ evalClass = "\\Psecio\\Iniscan\\Operation\\Operation" . ucwords ( strtolower ( $ test -> operation ) ) ; if ( ! class_exists ( $ evalClass ) ) { throw new \ InvalidArgumentException ( 'Invalid operation "' . $ test -> operation . '"' ) ; } $ value = ( isset ( $ test -> value ) ) ? $ test -> value : null ; $ this -> setValue ( $ value ) ; $ evalInstance = new $ evalClass ( $ this -> getSection ( ) ) ; if ( isset ( $ test -> version ) && ! $ this -> isVersion ( $ test -> version ) ) { $ this -> na ( ) ; } else { ( $ evalInstance -> execute ( $ test -> key , $ value , $ ini ) === false ) ? $ this -> fail ( ) : $ this -> pass ( ) ; } }
Evaluate the rule and its test

@param array $ini Current php.ini configuration
@throws \InvalidArgumentException
@return null
Evaluate the rule and its test