public function getEnabledFeatures($userId, $attributes = null)
    {
        $enabledFeatureKeys = [];

        if (!$this->validateInputs(
            [
                self::USER_ID => $userId
            ]
        )
        ) {
            return $enabledFeatureKeys;
        }

        if (!$this->_isValid) {
            $this->_logger->log(Logger::ERROR, "Datafile has invalid format. Failing '".__FUNCTION__."'.");
            return $enabledFeatureKeys;
        }

        $featureFlags = $this->_config->getFeatureFlags();
        foreach ($featureFlags as $feature) {
            $featureKey = $feature->getKey();
            if ($this->isFeatureEnabled($featureKey, $userId, $attributes) === true) {
                $enabledFeatureKeys[] = $featureKey;
            }
        }

        return $enabledFeatureKeys;
    }