@param array $arguments

@return string
494545
public function notify($arguments)
    {
        $defaults = [
            'type' => 'success',
            'icon' => 'fa fa-check-mark',
            'title' => false,
            'text' => false,
            'form' => false,
            'hide' => false,
            'addclass' => 'ccm-notification-page-alert',
            'buttons' => [],
        ];

        // overwrite all the defaults with the arguments
        $arguments = array_merge($defaults, $arguments);

        $arguments['addclass'] .= ' ccm-ui';

        $text = '';

        if ($arguments['form']) {
            $text .= $arguments['form'];
        }

        $text .= $arguments['text'];

        if (count($arguments['buttons']) > 0) {
            $text .= '<div class="ccm-notification-inner-buttons">';
            if (1 == count($arguments['buttons'])) {
                $singleButton = $arguments['buttons'][0];
                if ($singleButton instanceof Tag) {
                    $singleButton->addClass('btn btn-xs btn-default');
                }
                $text .= '<div>' . $singleButton . '</div>';
            } else {
                $text .= '<div class="btn-group"><button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">' . t('Action') . ' <span class="caret"></span></button><ul class="dropdown-menu">';
                foreach ($arguments['buttons'] as $button) {
                    $text .= '<li>' . $button . '</li>';
                }
                $text .= '</ul></div>';
            }
            $text .= '</div>';
        }

        if ($arguments['form']) {
            $text .= '</form>';
        }

        $arguments['text'] = $text;

        unset($arguments['buttons']);
        $string = json_encode($arguments);

        $content = '<script type="text/javascript">$(function() {';
        $content .= 'new PNotify(' . $string . ');';
        $content .= '});</script>';

        return $content;
    }
1128137
public static function escape(array $args): string
  {
    $command = '';
    foreach ($args as $arg)
    {
      if ($command!='') $command .= ' ';
      $command .= escapeshellarg($arg);
    }

    return $command;
  }
1364570
public function argument(Argument $argument)
    {
        $summary     = $this->prefixedArguments($argument);
        $printedName = mb_strstr($summary, ' ' . $argument->name());

        // Print the argument name if it's not printed yet.
        if (!$printedName && !$argument->noValue()) {
            $summary .= $argument->name();
        }

        if ($defaults = $argument->defaultValue()) {
            if (count($defaults) == 1) {
                $summary .= " (default: {$defaults[0]})";
            } else {
                $summary .= ' (defaults: ' . implode(', ', $defaults) . ')';
            }
        }

        return $summary;
    }
1357544
protected function prefixedArguments(Argument $argument)
    {
        $prefixes = [$argument->prefix(), $argument->longPrefix()];
        $summary  = [];

        foreach ($prefixes as $key => $prefix) {
            if (!$prefix) {
                continue;
            }

            $sub = str_repeat('-', $key + 1) . $prefix;

            if (!$argument->noValue()) {
                $sub .= " {$argument->name()}";
            }

            $summary[] = $sub;
        }

        return implode(', ', $summary);
    }
1072308
public function build(array $arguments = [])
    {
        $arguments = Arrays::arrayMergeRecursiveOverrule($this->arguments, $arguments);
        $arguments = $this->mergeArgumentsWithRequestArguments($arguments);

        $httpRequest = $this->request->getHttpRequest();

        $uriPathPrefix = $this->environment->isRewriteEnabled() ? '' : 'index.php/';
        $uriPathPrefix = $httpRequest->getScriptRequestPath() . $uriPathPrefix;
        $resolveContext = new ResolveContext($httpRequest->getBaseUri(), $arguments, $this->createAbsoluteUri, $uriPathPrefix);
        $resolvedUri = $this->router->resolve($resolveContext);
        if ($this->section !== '') {
            $resolvedUri = $resolvedUri->withFragment($this->section);
        }

        $this->lastArguments = $arguments;
        return (string)$resolvedUri;
    }
426882
protected function _argsToString(array $arguments) {
		$stringArguments = '';
		foreach ($arguments as $name => $value) {
			if (is_numeric($name)) {
				$stringArguments .= ' ' . $value;
			} else {
				$stringArguments .= ' ' . $name . ' ' . ProcessUtils::escapeArgument($value);
			}
		}

		return $stringArguments;
	}
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);
    }
1312995
private function getProcess(array $arguments)
    {
        $command = explode(' ', self::$command);
        if (self::$sudo) {
            array_unshift($command, 'sudo');
        }
        $command = array_merge($command, $arguments);

        $process = new Process($command);
        $process->setTimeout(self::$timeout);

        return $process;
    }
471704
private function renderArgument($argument)
    {
        if (is_array($argument)) {
            $argument = json_encode($argument);
        } elseif (null === $argument) {
            $argument = 'null';
        } elseif (is_string($argument)) {
            $argument = '"' . $argument . '"';
        }

        return $argument;
    }
887192
public function passthru(array $arguments = [])
    {
        passthru($this->getBin() . $this->prepareCommand($arguments), $exitCode);
        return $exitCode;
    }
261175
protected function getKeyArguments($arguments)
    {
        $keys = [];
        foreach ($arguments as $argument) {
            if (is_array($argument)) {
                $keys = array_merge($keys, $this->getKeyArguments($argument));
            }
            if (is_string($argument)) {
                $keys = array_merge($keys, $this->parseKeysString($argument));
            }
        }

        return $keys;
    }
3535
public function where(array $arguments)
    {
        foreach ($arguments as $key => $value) {
            $this->params[$key] = $value;
        }

        return $this;
    }
1011677
private function escape(array $arguments)
    {
        $args = array();
        foreach ($arguments as $k => $v) {
            if (is_array($v)) {
                $args[$k] = $this->escape($v);
            } elseif (is_string($v)) {
                $args[$k] = str_replace('%', '%%', $v);
            } else {
                $args[$k] = $v;
            }
        }

        return $args;
    }
468661
protected function getFixtureFingerprintArguments(array $arguments)
    {
        $fingerprintArguments = array();

        foreach ($arguments as $arg) {
            if (is_object($arg) && method_exists($arg, '__toString')) {
                $fingerprintArg = (string)$arg;
            } else {
                $fingerprintArg = $arg;
            }

            $fingerprintArguments[] = $fingerprintArg;
        }

        return $fingerprintArguments;
    }
792783
public function addArguments(array $arguments)
    {
        foreach ($arguments as $param => $value) {
            $this->addArgument($param, $value);
        }

        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];
	}
1005163
private static function parseCommands(array $arguments):array
    {
        $commands = [];
        foreach ($arguments as $one) {
            if (strpos($one, '--') === false) {
                $commands[] = $one;
            }
        }
        return ($commands);
    }