src/Phossa2/Cache/Traits/CacheItemAwareTrait.php
protected function validateKey(/*# string */ &$key)
    {
        // validate key
        if (is_string($key)) {
            $key = trim($key);
            return;
        }

        // throw exception
        throw new InvalidArgumentException(
            Message::get(Message::CACHE_INVALID_KEY, $key),
            Message::CACHE_INVALID_KEY
        );
    }
protected function validateKey(/*# string */ &$key)
    {
        // validate key
        if (is_string($key)) {
            $key = trim($key);
            return;
        }

        // throw exception
        throw new InvalidArgumentException(
            Message::get(Message::CACHE_INVALID_KEY, $key),
            Message::CACHE_INVALID_KEY
        );
    }
protected function validateKey ( /*# string */ & $ key ) { // validate key if ( is_string ( $ key ) ) { $ key = trim ( $ key ) ; return ; } // throw exception throw new InvalidArgumentException ( Message :: get ( Message :: CACHE_INVALID_KEY , $ key ) , Message :: CACHE_INVALID_KEY ) ; }
Validate key string

@param  string &$key key to check
@return void
@throws InvalidArgumentException
@access protected
Validate key string