protected function ensureValidKeys($keys)
    {
        if (!is_array($keys) && !($keys instanceof \Traversable)) {
            throw new InvalidArgumentException('A cache key set must be either an array or a Traversable.');
        }

        foreach ($keys as $key) {
            $this->ensureValidKey($key);
        }
    }
protected function ensureValidKeys($keys)
    {
        if (!is_array($keys) && !($keys instanceof \Traversable)) {
            throw new InvalidArgumentException('A cache key set must be either an array or a Traversable.');
        }

        foreach ($keys as $key) {
            $this->ensureValidKey($key);
        }
    }
protected function ensureValidKeys ( $ keys ) { if ( ! is_array ( $ keys ) && ! ( $ keys instanceof \ Traversable ) ) { throw new InvalidArgumentException ( 'A cache key set must be either an array or a Traversable.' ) ; } foreach ( $ keys as $ key ) { $ this -> ensureValidKey ( $ key ) ; } }
Ensure the validity of the given cache keys.

@param mixed $keys The keys to check.
@return void
@throws \Cake\Cache\InvalidArgumentException When the keys are not valid.
Ensure the validity of the given cache keys .