Return option values indexed by name using camelCased keys

@param  array  $options Array of options

@return mixed[] Array of options indexed by (camelCased) name
968728
public static function optionsToCamelCase(array $options)
    {
        $optionsByName = array();

        if (count($options)) {
            foreach ($options as $name => $value) {
                $optionsByName[Util::snakeToCamelCase($name)] = $value;
            }
        }

        return $optionsByName;
    }
300811
public function toArray(array $options = null)
    {
        $array = [];

        foreach ($this->getResult() as $item) {
            if (method_exists($item, 'toArray')) {
                array_push($array, $item->toArray($options));
            } else {
                array_push($array, $item);
            }
        }

        return $array;
    }
1076334
public static function normalize($options)
    {
        //normalize not indexed fields
        foreach ($options as $key => $value) {
            if (\is_int($key)) {
                if (!isset($options[$value])) {
                    $options[$value] = true;
                }
                unset($options[$key]);
            }
        }

        //normalize comma separated names
        foreach ($options as $fieldsNames => $option) {
            if (strpos($fieldsNames, ',') !== false) {
                $fieldNamesArray = explode(',', $fieldsNames);
                foreach ($fieldNamesArray as $name) {
                    $name = trim($name);
                    if (!isset($options[$name])) {
                        $options[$name] = $option;
                        unset($options[$fieldsNames]);
                    }
                }
            }
        }

        return $options;
    }
1029293
protected function optionsToAjax($options)
    {
        $processed = [];
        foreach ($options as $id => $result) {
            $processed[] = ['id' => $id, 'name' => trans($result)];
        }
        return $processed;
    }
102799
private static function adjustOptions(array $options) {
        $result = [];

        foreach($options as $key => $value) {
            $result[str_replace("-", "_", $key)] = $value;
        }

        return $result;
    }
319322
public function getChoices(Options $options)
    {
        if (!$options['category'] instanceof CategoryInterface) {
            return [];
        }

        if (null === $options['context']) {
            $categories = $this->manager->getAllRootCategories();
        } else {
            $categories = $this->manager->getRootCategoriesForContext($options['context']);
        }

        $choices = [];

        foreach ($categories as $category) {
            $choices[$category->getId()] = sprintf('%s (%s)', $category->getName(), $category->getContext()->getId());

            $this->childWalker($category, $options, $choices);
        }

        return $choices;
    }
645875
protected function convertContextOptions(array $options)
    {
        $contextOptions = [];
        foreach ($options as $key => $value) {
            $section = 'http';
            if (strpos($key, 'ssl') === 0) {
                $section = 'ssl';
                $key = substr($key, 3);
            }
            $key = Inflector::underscore($key);
            $contextOptions[$section][$key] = $value;
        }

        return $contextOptions;
    }
1286456
function getOptions(array $options = array())
    {
        if (empty($options)) {
            $params = array(1, $this->username, $this->password);
        } else {
            $params = array(1, $this->username, $this->password, $options);
        }

        return $this->sendRequest('wp.getOptions', $params);
    }
1303243
protected function getOptions(): array
	{
		$options = [];

		foreach($this->options as $group)
		{
			foreach($group as $name => $option)
			{
				$options[] = ['--' . $name, $option['description']];
			}
		}

		sort($options);

		return $options;
	}
1125640
protected function getOptions(array $options)
    {
        $labels = [];
        if ($this->hasLanguages()) {
            // As this point we are construction the options for multiple languages
            foreach ($this->languages as $language) {
                foreach ($options as $key => $option) {
                    $labels[$language][$key] = Helpers::convertNameToLabel($option);
                }
            }
        } else {

            // At this point we are just formatting the labels
            foreach ($options as $key => $option) {
                $labels[$key] = Helpers::convertNameToLabel($option);
            }
        }

        return $labels;
    }
527556
protected function getFilteredOptions(array $options)
    {
        $default = $this->getDefaultOptions();
        $options = \array_merge($default, $options);

        $uses = \array_unique(\array_merge([
            'path', 'filename', 'extension', 'format',
        ], \array_keys($default)));

        $data = Arr::only($options, $uses);

        return $data;
    }
1071404
public function options(array $options = null)
    {
        if (null === $options) {
            return $this->options;
        }

        $this->options = [];
        foreach($options as $option)
            $this->options[$option] = false;

        return $this;
    }
1101851
public function options($options = [])
    {
        if (empty($options)) {
            return $this->options;
        }

        $this->options = array_merge($this->options, $options);
    }
294586
public function getOptions($options = array())
    {
        if ($options instanceof \Zend_Config) {
            return $options->toArray();
        } elseif (!is_array($options)) {
            throw new \Zend_Validate_Exception('$config must be an instance of Zend_Config or array.');
        }
        
        return $options;
    }
71832
private function renameQueryOptions(array $options, array $rename) : array
    {
        if (empty($options)) {
            return $options;
        }

        $options = array_combine(
            array_map(
                static function ($key) use ($rename) {
                    return $rename[$key] ?? $key;
                },
                array_keys($options)
            ),
            array_values($options)
        );

        // Necessary because of https://github.com/phpstan/phpstan/issues/1580
        assert($options !== false);

        return $options;
    }
103617
public function getIdFromOptions(array $options) : string
    {
        $optionsResolver = new OptionsResolver();
        $optionsResolver->setRequired('id');

        $options = $optionsResolver->resolve($options);

        return $options['id'];
    }
1331825
protected function getOptions($optionNames = null)
    {
        $options = [];

        if ($optionNames === null) {
            $optionNames = $this->optionNames;
        }

        foreach ($optionNames as $option) {
            $converter = 'convert' . ucfirst($option);
            $value = method_exists($this, $converter) ? $this->$converter() : $this->$option;

            if ($value === null) {
                continue;
            }

            $options[$option] = $value;
        }

        return $options;
    }