private function validateUserInputs($attributes, $eventTags = null)
    {
        if (!is_null($attributes) && !Validator::areAttributesValid($attributes)) {
            $this->_logger->log(Logger::ERROR, 'Provided attributes are in an invalid format.');
            $this->_errorHandler->handleError(
                new InvalidAttributeException('Provided attributes are in an invalid format.')
            );
            return false;
        }

        if (!is_null($eventTags)) {
            if (!Validator::areEventTagsValid($eventTags)) {
                $this->_logger->log(Logger::ERROR, 'Provided event tags are in an invalid format.');
                $this->_errorHandler->handleError(
                    new InvalidEventTagException('Provided event tags are in an invalid format.')
                );
                return false;
            }
        }

        return true;
    }
private function validateUserInputs($attributes, $eventTags = null)
    {
        if (!is_null($attributes) && !Validator::areAttributesValid($attributes)) {
            $this->_logger->log(Logger::ERROR, 'Provided attributes are in an invalid format.');
            $this->_errorHandler->handleError(
                new InvalidAttributeException('Provided attributes are in an invalid format.')
            );
            return false;
        }

        if (!is_null($eventTags)) {
            if (!Validator::areEventTagsValid($eventTags)) {
                $this->_logger->log(Logger::ERROR, 'Provided event tags are in an invalid format.');
                $this->_errorHandler->handleError(
                    new InvalidEventTagException('Provided event tags are in an invalid format.')
                );
                return false;
            }
        }

        return true;
    }
private function validateUserInputs ( $ attributes , $ eventTags = null ) { if ( ! is_null ( $ attributes ) && ! Validator :: areAttributesValid ( $ attributes ) ) { $ this -> _logger -> log ( Logger :: ERROR , 'Provided attributes are in an invalid format.' ) ; $ this -> _errorHandler -> handleError ( new InvalidAttributeException ( 'Provided attributes are in an invalid format.' ) ) ; return false ; } if ( ! is_null ( $ eventTags ) ) { if ( ! Validator :: areEventTagsValid ( $ eventTags ) ) { $ this -> _logger -> log ( Logger :: ERROR , 'Provided event tags are in an invalid format.' ) ; $ this -> _errorHandler -> handleError ( new InvalidEventTagException ( 'Provided event tags are in an invalid format.' ) ) ; return false ; } } return true ; }
Helper function to validate user inputs into the API methods.

@param $userId string ID for user.
@param $eventTags array Hash representing metadata associated with an event.

@return boolean Representing whether all user inputs are valid.
Helper function to validate user inputs into the API methods .