Explode the "value" and "key" arguments passed to "pluck".

@param  string|array $value
@param  string|array|null $key

@return array
490078
protected static function explodeParameters($value, $key)
    {
        if (is_string($value)) {
            $value = self::explodeDotNotationKeys($value);
        }

        if (!is_null($key) && is_array($key)) {
            $key = self::explodeDotNotationKeys($key);
        }

        return [$value, $key];
    }
835235
public function pluck($value, $key = null)
    {
        return new static(Arr::pluck($this->items, $value, $key));
    }
316151
private function pluck($key, array &$arr, $isRequired = true)
    {
        if (!array_key_exists($key, $arr)) {
            if ($isRequired) {
                throw new \InvalidArgumentException(
                    "Key $key does not exist in the provided array."
                );
            }

            return null;
        }

        $value = $arr[$key];
        unset($arr[$key]);
        return $value;
    }
1157099
public function pluck(string $key): ArrayCollection
    {
        return $this->map(function ($value) use ($key) {
            return $value[$key] ?? null;
        });
    }
156347
public static function set(&$array, $key, $value = null)
    {
        if (is_null($key)) {
            $array = $value;
            return;
        }
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                static::set($array, $k, $v);
            }
        } else {
            $keys = explode('.', $key);
            while (count($keys) > 1) {
                $key = array_shift($keys);
                if (!isset($array[$key]) or !is_array($array[$key])) {
                    $array[$key] = [];
                }
                $array =& $array[$key];
            }
            $array[array_shift($keys)] = $value;
        }
    }
1140048
public static function arrayPick(array &$array, $key, $value = null)
    {
        if (array_key_exists($key, $array)) {
            $value = $array[$key] ?? $value;
            unset($array[$key]);
        }

        return $value;
    }
1298385
public function setParameter($key, $value)
    {
        $path = explode('.', $key);

        $this->validateParameter($key, $value);


        $root = array();
        $r = &$root;
        foreach($path as $subNode) {
            $r[$subNode] = array();
            $r = &$r[$subNode];
        }
        $r = $value;
        $r = &$root;

        if ($this->parameters) {
            $parameters = $this->parameters->extract();
        }
        else {
            $parameters = array();
        }

        $this->parameters = new ArrayResolver(Arrays::mergeRecursiveUnique($parameters, $r));
        return $this;
    }
331354
public function share($key, $value = null)
    {
        if (! is_array($key)) {
            return parent::share($key, $this->decorate($value));
        }

        return parent::share($this->decorate($key));
    }
492980
public function groups($key = NULL, $value = NULL)
	{
		if ($key === NULL)
			return $this->_groups;
	
		if (is_array($key))
		{
			$this->_groups = $key;
		}
		else
		{
			if ($value === NULL)
				return isset($this->_groups[$key]) ? $this->_groups[$key] : NULL;
	
			$this->_groups[$key] = $value;
		}
	
		return $this;
	}
1129479
private function parseArray(string $key, $value): string
    {
        return sprintf('%s%s%s', $key, $this->delimiter, implode(',', $value));
    }
1313613
public static function pluck($array, string $key, $defaultValue = null): array
    {
        $result = [];
        if (!is_array($array)) {
            return $result;
        }

        // Extract key/path.
        $keyLast = Str::last($key, '.');
        $key = Str::removeLast($key, '.');

        // Extract data.
        if ($key !== '' && $key !== null) {
            $array = self::dataByPath($array, $key, false, []);
        }
        foreach ($array as $item) {
            $value = $defaultValue;
            if (is_object($item) && isset($item->{$keyLast})) {
                $value = $item->{$keyLast};
            } elseif (is_array($item) && isset($item[$keyLast])) {
                $value = $item[$keyLast];
            }
            $result[] = $value;
        }

        return $result;
    }
1139651
public static function set(&$array, $key = null, $value = null, $opr = null)
    {
        if (null === $value) {
            return $array;
        }
        if (null === $key) {
            return $array = $value;
        }
        if (null === $opr) {
            return $array[$key] = $value;
        }

        $keys = explode($opr, $key);
        foreach ($keys as $key) {
            if (!isset($array[$key]) || !is_array($array[$key])) {
                $array[$key] = [];
            }

            $array = &$array[$key];
        }

        $array = $value;

        return $array;
    }
635954
public function shareData($key, $value= null)
    {
        if (is_array($key)) {
            foreach  ($key as $variableName => $variableValue) {
                $this->templateRenderer->setData($variableName, $variableValue);
            }
            return $this;
        }

        $this->templateRenderer->setData($key, $value);
        return $this;
    }
1078606
public static function prepend($array, $value, $key = null)
    {
        if (is_null($key)) {
            array_unshift($array, $value);
        } else {
            $array = [$key => $value] + $array;
        }

        return $array;
    }
492292
private function parsePhpValue($key, $value, array &$result)
    {
        $node =& $result;
        $keyBuffer = '';

        for ($i = 0, $t = strlen($key); $i < $t; $i++) {
            switch ($key[$i]) {
                case '[':
                    if ($keyBuffer) {
                        $this->prepareNode($node, $keyBuffer);
                        $node =& $node[$keyBuffer];
                        $keyBuffer = '';
                    }
                    break;
                case ']':
                    $k = $this->cleanKey($node, $keyBuffer);
                    $this->prepareNode($node, $k);
                    $node =& $node[$k];
                    $keyBuffer = '';
                    break;
                default:
                    $keyBuffer .= $key[$i];
                    break;
            }
        }

        if (isset($node)) {
            $this->duplicates = true;
            $node[] = $value;
        } else {
            $node = $value;
        }
    }
9968
public static function pluck(array $values, $key)
    {
        return array_map(
            function($val) use ($key) {
                return is_object($val) ? $val->{$key} : $val[$key];
            },
            $values
        );
    }
553953
private function parseValue(string $key, $value): string
    {

        if (is_array($value)) {
            return $this->parseArray($key, $value);
        }

        return $this->parseScalar($key, $value);
    }