protected function parse(array $features)
    {
        $allowed = [];

        foreach ($features as $feature => $value) {
            if (is_int($feature)) {
                // Allow theme features without options.
                // Though post formats must be added with properties.
                // Here we first check that "post-formats" is not provided
                // without a value. If so, just pass it.
                if (! in_array($value, $this->mustHaveProperties, true)) {
                    $allowed[$value] = $value;
                } else {
                    throw new \InvalidArgumentException(
                        'The theme feature ['.$value.'] must have a defined property in order to work.'
                    );
                }
            } else {
                $allowed[$feature] = $value;
            }
        }

        return $allowed;
    }