Get the argument string

@param boolean $asString
@return string|array
@deprecated Use ParameterContainer methods
160807
public function getArguments($asString = false)
    {
        if ($asString) {
            $str = (string) $this->arguments;
            return $str;
        }
        return $this->arguments->all();
    }
1362804
public function getString($String)
    {
        if (isset($this->Data[$String])) {
            return $this->Data[$String];
        }
        return isset($this->Fallback[$String]) ? $this->Fallback[$String] : '';
    }
1252158
public static function removeStopWords($string, $asString = false)
    {
        $delimiters = preg_quote(static::$delimiters, '/');
        $stopWords = explode(',', static::$stopWords);

        $result = array_map(function ($token) {
            return $token;
        }, array_filter(
            array_map(function ($t) {
                return mb_strtolower($t, 'UTF-8');
            }, preg_split("/[\\s$delimiters]+/", $string, -1, PREG_SPLIT_NO_EMPTY)),
            function ($word) use ($stopWords) {
                return !in_array($word, $stopWords);
            }
        ));
        if ($asString) {
            return implode(' ', $result);
        }

        return $result;
    }
1360313
function getAttributes($asString = false)
    {
        if ($asString) {
            return $this->_getAttrString($this->_attributes);
        } else {
            return $this->_attributes;
        }
    }
546846
public function getCallbackAsString()
    {
        if (is_string($this->callback)) {
            return $this->callback;
        }

        if (is_array($this->callback) && count($this->callback) == 2) {
            list($object, $method) = array_values($this->callback);
            is_object($object) ? sprintf('object[%s]#%s', get_class($object), spl_object_hash($object)) : strval($object);

            return sprintf('[%s, %s]', $object, $method);
        }

        if (is_object($this->callback)) {
            return sprintf('object[%s]', get_class($this->callback), spl_object_hash($this->callback));
        }

        return strval($this->callback);
    }
389488
public function asString()
    {
        $display = function ($lines, $length, $loop = 0) use (&$display) {
            $output = '';
            foreach ($lines as $line) {
                $line = is_a($line, 'Deflection\Element\AbstractElement') ? $line->getElement() : $line;
                if (is_array($line)) {
                    $output .= $display($line, $length, $loop+1);
                } else {
                    $size = mb_strlen($line)+($length*$loop);
                    $output .= str_pad($line, $size, ' ', STR_PAD_LEFT)."\n";
                }
            }
            return $output;
        };
        return !$this->class ?: "<?php\n".$display($this->class->getElement(), $this->tab);
    }
1043629
private function stringIsWrapped(&$inputString, $specialCharacterLeft = '[', $specialCharacterRight = ']')
    {
        $isWrapped = ($inputString[0] == $specialCharacterLeft && $inputString[mb_strlen($inputString) - 1] == $specialCharacterRight);

        $inputString = str_replace(array($specialCharacterLeft, $specialCharacterRight), '', $inputString);

        return $isWrapped;
    }
37826
public static function ArgString($arg){

		$type = gettype($arg);

		if( $type === 'object'){
			$string = $arg->cache_string;
			unset($arg->cache_string);
			return $string;

		}elseif( $type === 'array' ){
			$string = ' Array(';
			foreach($arg as $k => $a){
				$string .= var_export($k,true).' => '.self::ArgString($a).',';
			}
			return $string . ')';
		}

		return var_export($arg,true);
	}
708004
private function get_update_type_str( $assoc_args ) {
		$update_type = ' ';
		foreach ( array( 'major', 'minor', 'patch' ) as $type ) {
			if ( true === \WP_CLI\Utils\get_flag_value( $assoc_args, $type ) ) {
				$update_type = ' ' . $type . ' ';
				break;
			}
		}
		return $update_type;
	}
1333485
public function pass($asString = false)
    {
        if (!$this->_checked) {
            $this->check();
        }

        if (!$asString) {
            return $this->_pass;
        }

        $items = [];
        foreach ($this->_pass as $rule) {
            $items[] = "{$rule}";
        }

        return implode(', ', $items);
    }
1113101
protected function getString($data)/*# : string */
    {
        if (is_scalar($data)) {
            return strval($data);
        } elseif (is_array($data)) {
            return 'ARRAY[' . count($data) . ']';
        } elseif (is_object($data)) {
            return $this->getObjectString($data);
        } else {
            return 'TYPE: ' . gettype($data);
        }
    }
1216420
public function getAsString()
	{
		$permissions	= @fileperms( $this->pathName );
		if( FALSE === $permissions )
			throw new InvalidArgumentException( 'Could not get permissions of file "'.$this->pathName.'"' );
		return self::getStringFromOctal( $permissions );
	}
1205551
protected function getArrayString($a)
	{
		$s = 'array(';
		$i = 0;
		foreach ($a as $k => $v)
		{
			$s .= ($i) ? ', ' : '';
			$s .= '"' . $k . '" => ';
			if (is_array($v) || is_object($v))
			{
				$s .= $this->getArrayString((array) $v);
			}
			else
			{
				$s .= '"' . addslashes($v) . '"';
			}
			$i++;
		}
		$s .= ')';
		return $s;
	}
329782
public static function formatRequestData($asString = true)
    {
        $fromServer = array(
            'REQUEST_URI',
            'REQUEST_METHOD',
            'HTTP_REFERER',
            'QUERY_STRING',
            'HTTP_USER_AGENT',
            'REMOTE_ADDR',
        );

        if($asString) {
            $s = "\n\n";
            $s .= isset($_REQUEST)? "REQUEST: " . print_r($_REQUEST, true) . PHP_EOL   : '';
            foreach ($fromServer as $item) {
                $s .= isset($_SERVER[$item]) ? "{$item}: {$_SERVER[$item]}\n" : '';
            }
        } else {
            $s = array(
                'REQUEST' => $_REQUEST,
                'SERVER'  => $_SERVER,
            );
        }

        return $s;
    }
191231
private function _parseArgs(array $args)
	{
		$arg = '';
		if(count($args) > 0)
		{
			foreach($args as $number => $argument)
			{
				if($number === 0)
				{
					$arg .= $argument;
				}
				else
				{
					$arg .= ', ' . $argument;
				}
			}
		}

		return $arg;
	}
1369363
public function asString(): string
    {
        $parts = [];
        foreach ($this->acceptables as $acceptable => $priority) {
            if (1.0 === $priority) {
                $parts[] = $acceptable;
            } else {
                $parts[] = $acceptable . ';q=' . $priority;
            }
        }

        return join(',', $parts);
    }
227076
public static function toString($input = false) {

        if ($input) {

            $string = (string) $input;
            if (Validate::isString($string)) {

                return $string;
            }
        }

        return false;
    }