public function contains($key, $fallback = true)
    {
        if (!isset(self::$compositeKeys[$key]) && !isset(self::$keys[$key])) {
            throw NoSuchConfigKeyException::forKey($key);
        }

        if (array_key_exists($key, $this->values)) {
            return true;
        }

        if (isset(self::$compositeKeys[$key]) && $this->containsKeyPrefix($key.'.')) {
            return true;
        }

        if ($fallback && $this->baseConfig) {
            return $this->baseConfig->contains($key);
        }

        return false;
    }