Remove all options from the list of arguments so the arguments can be
correctly extracted

@param StreamInterface<string> $arguments

@return StreamInterface<string>
186875
public function clean(StreamInterface $arguments): StreamInterface
    {
        return $this->inputs->reduce(
            $arguments,
            static function(StreamInterface $arguments, Option $option): StreamInterface {
                return $option->clean($arguments);
            }
        );
    }
1252284
public function remove(string ...$args): self
    {
        $classes = $this->getClasses();

        $classes = array_diff($classes, $args);

        $this->html->setAttribute('class', implode(' ', $classes));

        return $this;
    }
233028
public function removeSession(...$args)
    {
        $results = $this->remove('session', ...$args);

        // @codeCoverageIgnoreStart
        if (isset($_SESSION)) {
            $_SESSION = $this->get('session');
        }
        // @codeCoverageIgnoreEnd

        return $results;
    }
412341
protected function withFileStream(StreamInterface $stream)
    {
        return $this->withBody($stream)->withHeader('Content-Length', (string) $stream->getSize());
    }
1218782
public function removeArgument($arg)
    {
        if (($key = array_search($arg, $this->arguments)) !== false) {
            unset($this->arguments[$key]);
        }

        return $this;
    }
545575
protected function _parseArguments($arguments) {
		$words = null;
		$function = $arguments[0];
		unset($arguments[0]);
		if (!in_array($function, array_merge($this->validMethods, ['all']))) {
			$function = $this->_getMethod();
		}

		$arguments = array_reverse($arguments);
		if (count($arguments) == 0) {
			$words = $this->_getWords();
		} else {
			while (count($arguments) > 0) {
				$words .= array_pop($arguments);
				if (count($arguments) > 0) {
					$words .= ' ';
				}
			}
		}

		return ['method' => $function, 'words' => $words];
	}
150812
public function setArguments($arguments)
    {
        $parameters = array_merge($this->getDefaults(), $this->arguments);

        $this->arguments = array_merge($parameters, $arguments);

        return $this;
    }
1189874
protected function sanitizeCommandArguments(array $arguments)
    {
        $args       = array();
        $files      = array();
        $fileMode   = false;
        foreach ($arguments as $k => $v) {
            if ($v === '--' || $k === '--') {
                $fileMode   = true;
                continue;
            }
            if (is_int($k)) {
                if (strpos($v, '-') === 0) {
                    $args[]  = $this->sanitizeCommandArgument($v, null);
                } else if ($fileMode) {
                    $files[] = escapeshellarg($v);
                } else {
                    $args[]  = escapeshellarg($v);
                }
            } else {
                if (strpos($k, '-') === 0) {
                    $args[] = $this->sanitizeCommandArgument($k, $v);
                }
            }
        }
        return array($args, $files);
    }
896717
public function removeArgument(IStackableArgument $argument)
    {
        if ($argument instanceof ISubKeyedStackableArgument) {
            $key = $argument->getSubKey();
        } else {
            $key = $this->stackKey();
        }

        unset($this->args[$key][$argument->getSubKey()]);
        if (empty($this->args[$key])) {
            unset($this->args[$key]);
        }

        return $this;
    }
399963
private function invokeInternalStreamWrapper(string $functionName, ...$arguments)
    {
        $silentExecution = $functionName{0} === '@';
        $functionName = ltrim($functionName, '@');
        $this->restoreInternalSteamWrapper();

        try {
            if ($silentExecution) {
                $result = @call_user_func_array($functionName, $arguments);
            } else {
                $result = call_user_func_array($functionName, $arguments);
            }
        } finally {
            $this->registerStreamWrapper();
        }

        return $result;
    }
632332
public static function fromStream(StreamInterface $stream)
    {
        if (! $stream->isReadable() || ! $stream->isSeekable()) {
            throw new InvalidArgumentException('Message stream must be both readable and seekable');
        }

        $stream->rewind();

        list($method, $requestTarget, $version) = self::getRequestLine($stream);
        $uri = self::createUriFromRequestTarget($requestTarget);

        list($headers, $body) = self::splitStream($stream);

        return (new Request($uri, $method, $body, $headers))
            ->withProtocolVersion($version)
            ->withRequestTarget($requestTarget);
    }
1053167
public function sendRequest(array $data): StreamInterface
    {
        $options[RequestOptions::FORM_PARAMS] = $data;

        return $this->send($options);
    }
588526
protected function filterPrefix(array $arguments)
    {
        if (empty($arguments)) {
            throw new InvalidCallException('At least one argument needed');
        }
        $path = array_shift($arguments);
        if (!is_string($path)) {
            throw new InvalidParamException('First argument should be a string');
        }
        if (!preg_match('#^[a-zA-Z0-9]+\:\/\/.*#', $path)) {
            throw new InvalidParamException('No prefix detected in for path: ' . $path);
        }
        list ($prefix, $path) = explode('://', $path, 2);
        array_unshift($arguments, $path);
        return array($prefix, $arguments);
    }
299561
public function filterPrefix(array $arguments)
    {
        if (empty($arguments)) {
            throw new InvalidArgumentException('At least one argument needed');
        }

        $path = array_shift($arguments);

        if ( ! is_string($path)) {
            throw new InvalidArgumentException('First argument should be a string');
        }

        list($prefix, $path) = $this->getPrefixAndPath($path);
        array_unshift($arguments, $path);

        return [$prefix, $arguments];
    }
607807
public function useStream(Stream $stream): ControllerInterface
    {
        $this->soap("AVTransport", "SetAVTransportURI", [
            "CurrentURI"            =>  $stream->getUri(),
            "CurrentURIMetaData"    =>  $stream->getMetaData(),
        ]);

        return $this;
    }
189677
protected function _extractSegments(&$arguments)
    {
        if (is_string($arguments)) $this->_extractArguments($arguments);
        foreach ($arguments as $var=>$val) {
            if (empty($val) && strpos($var, '/')!==false) {
                $parts = explode('/', $var);
                unset($arguments[$var]);
                $index = null;
                foreach ($parts as $part) {
                    if (is_null($index)) {
                        $index = $part;
                    } else {
                        $arguments[$index] = $part;
                        $index = null;
                    }
                }
            }
        }
    }
185223
protected function removeArgumentsFromTemplateVariableContainer(array $arguments)
    {
        $templateVariableContainer = $this->getWidgetRenderingContext()->getTemplateVariableContainer();
        foreach ($arguments as $identifier => $value) {
            $templateVariableContainer->remove($identifier);
        }
    }