protected function exactEvaluator($condition)
    {
        $conditionName = $condition['name'];
        $conditionValue = $condition['value'];
        $userValue = isset($this->userAttributes[$conditionName]) ? $this->userAttributes[$conditionName]: null;

        if (!$this->isValueTypeValidForExactConditions($conditionValue) ||
            ((is_int($conditionValue) || is_float($conditionValue)) && !Validator::isFiniteNumber($conditionValue))) {
            $this->logger->log(Logger::WARNING, sprintf(
                logs::UNKNOWN_CONDITION_VALUE,
                json_encode($condition)
            ));
            return null;
        }

        if (!$this->isValueTypeValidForExactConditions($userValue) ||
            !Validator::areValuesSameType($conditionValue, $userValue)) {
            $this->logger->log(Logger::WARNING, sprintf(
                logs::UNEXPECTED_TYPE,
                json_encode($condition),
                gettype($userValue),
                $conditionName
            ));
            return null;
        }

        if ((is_int($userValue) || is_float($userValue)) &&
            !Validator::isFiniteNumber($userValue)) {
            $this->logger->log(Logger::WARNING, sprintf(
                logs::INFINITE_ATTRIBUTE_VALUE,
                json_encode($condition),
                $conditionName
            ));
            return null;
        }

        return $conditionValue == $userValue;
    }
protected function exactEvaluator($condition)
    {
        $conditionName = $condition['name'];
        $conditionValue = $condition['value'];
        $userValue = isset($this->userAttributes[$conditionName]) ? $this->userAttributes[$conditionName]: null;

        if (!$this->isValueTypeValidForExactConditions($conditionValue) ||
            ((is_int($conditionValue) || is_float($conditionValue)) && !Validator::isFiniteNumber($conditionValue))) {
            $this->logger->log(Logger::WARNING, sprintf(
                logs::UNKNOWN_CONDITION_VALUE,
                json_encode($condition)
            ));
            return null;
        }

        if (!$this->isValueTypeValidForExactConditions($userValue) ||
            !Validator::areValuesSameType($conditionValue, $userValue)) {
            $this->logger->log(Logger::WARNING, sprintf(
                logs::UNEXPECTED_TYPE,
                json_encode($condition),
                gettype($userValue),
                $conditionName
            ));
            return null;
        }

        if ((is_int($userValue) || is_float($userValue)) &&
            !Validator::isFiniteNumber($userValue)) {
            $this->logger->log(Logger::WARNING, sprintf(
                logs::INFINITE_ATTRIBUTE_VALUE,
                json_encode($condition),
                $conditionName
            ));
            return null;
        }

        return $conditionValue == $userValue;
    }
protected function exactEvaluator ( $ condition ) { $ conditionName = $ condition [ 'name' ] ; $ conditionValue = $ condition [ 'value' ] ; $ userValue = isset ( $ this -> userAttributes [ $ conditionName ] ) ? $ this -> userAttributes [ $ conditionName ] : null ; if ( ! $ this -> isValueTypeValidForExactConditions ( $ conditionValue ) || ( ( is_int ( $ conditionValue ) || is_float ( $ conditionValue ) ) && ! Validator :: isFiniteNumber ( $ conditionValue ) ) ) { $ this -> logger -> log ( Logger :: WARNING , sprintf ( logs :: UNKNOWN_CONDITION_VALUE , json_encode ( $ condition ) ) ) ; return null ; } if ( ! $ this -> isValueTypeValidForExactConditions ( $ userValue ) || ! Validator :: areValuesSameType ( $ conditionValue , $ userValue ) ) { $ this -> logger -> log ( Logger :: WARNING , sprintf ( logs :: UNEXPECTED_TYPE , json_encode ( $ condition ) , gettype ( $ userValue ) , $ conditionName ) ) ; return null ; } if ( ( is_int ( $ userValue ) || is_float ( $ userValue ) ) && ! Validator :: isFiniteNumber ( $ userValue ) ) { $ this -> logger -> log ( Logger :: WARNING , sprintf ( logs :: INFINITE_ATTRIBUTE_VALUE , json_encode ( $ condition ) , $ conditionName ) ) ; return null ; } return $ conditionValue == $ userValue ; }
Evaluate the given exact match condition for the given user attributes.

@param  object $condition

@return null|boolean true if the user attribute value is equal (===) to the condition value,
false if the user attribute value is not equal (!==) to the condition value,
null if the condition value or user attribute value has an invalid type, or
if there is a mismatch between the user attribute type and the condition
value type.
Evaluate the given exact match condition for the given user attributes .