Wrapper

@param string $commandLine

@return string
516427
protected function decorate(string $commandLine): string
    {
        // Allow others to decorate the command
        $event = new QueueCommandEvent(['commandLine' => $commandLine]);
        $this->trigger(self::EVENT_PREPARE_COMMAND, $event);
        $commandLine = $event->commandLine;

        if ($event->useDefaultDecoration === false) {
            return $commandLine;
        }

        // default decoration
        return "nice $commandLine > /dev/null 2>&1 &";
    }
1311437
private ShellCommand getCommandForLine(final String line) {

		final int pos                             = line.indexOf(" ");
		final String commandString                = pos > 0 ? line.substring(0, pos) : line;
		final Class<? extends ShellCommand> clazz = commands.get(commandString);

		if (clazz != null) {

			try {

				return clazz.newInstance();

			} catch (Throwable t) {
				logger.warn("", t);
			}
		}

		return null;
	}
1272141
public function getCommand($commandAlias)
    {
        if (!array_key_exists($commandAlias, $this->commands)) {
            throw new CommandException(sprintf('The command "%s" is not registered', $commandAlias));
        }

        return $this->commands[$commandAlias];
    }
197560
protected static function getIndentation($line)
    {
        preg_match('/^\s*/', $line, $match);

        if (isset($match[0])) {
            $match[0] = trim($match[0], "\n\r");

            if (strlen($match[0]) > 0) {
                return $match[0];
            }
        }

        return '    ';
    }
1036389
protected function parseLine(string $line): string
    {
        if (!$this->isHiraganaCodePoints($line)) {
            throw new SyntaxException(_('ピクトセンスで使用可能の文字はひらがな、「ヴ」「ー」のみです。ただし、「ゔ」「ゕ」「ゖ」「𛀁」も使用できません: ') . $line);
        }
        
        if (mb_strlen($line, 'UTF-8') > self::WORD_MAX) {
            throw new SyntaxException(sprintf(_('「%1$s」は%2$d文字を越えています。'), $line, self::WORDS_MAX));
        }

        return str_replace('ヴ', 'ゔ', $line);
    }
1124720
private function wrapUrl($url)
    {
        if ($this->balancer) {
            $url = sprintf('%s?url=%s', $this->balancer, urlencode($url));
        }

        $this->lastUrl = $url;

        return $url;
    }
1193769
private function getArgumentText() : string
    {
        if (count($this->command->getArguments()) === 0) {
            return '  No arguments';
        }

        $argumentTexts = [];

        foreach ($this->command->getArguments() as $argument) {
            $argumentTexts[] = [$argument->getName(), $argument->getDescription()];
        }

        return $this->paddingFormatter->format($argumentTexts, function ($row) {
            return "  <info>{$row[0]}</info> - {$row[1]}";
        });
    }
785262
protected static function splitFirstLine($firstLine)
    {
        $parts = preg_split('/\\s/', $firstLine, null, PREG_SPLIT_NO_EMPTY);
        if (count($parts) > 1) {
            return $parts;
        }
        $parts = explode(',', $firstLine);
        if (count($parts) > 1) {
            return $parts;
        }

        return preg_split('/(\\d+\\D*)/', $firstLine, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
    }
1220006
private function transformDescriptionLines(array $descriptionLines)
    {
        $description = '';

        foreach ($descriptionLines as $line) {
            $description .= $this->transformString($line);
        }

        return $description;
    }
534075
public function returnRmLine($noLine)
    {
        if ($noLine < 1 || $noLine <= (sizeof($this->getLines()) + 1)) {
            $idTable = $this->getId();
            $params['noLine'] = $noLine;
            $params['maxLine'] = sizeof($this->getLines()) + 1;
            return self::formatRetour($idTable, $idTable, 'rmLineUpdate', $params);
        }
        return false;
    }
112130
private function getLine():string
	{
		$line= fgets( $this->handle );

		$this->raw.= $line;

		return trim( $line );
	}
1314619
private function constructOptionsString()
    {
        $options = implode(' ', $this->commandLineOptions);

        foreach ($this->properties as $name => $value) {
            $arg = sprintf('%s=%s', $name, $value);
            $options .= ' -D ' . escapeshellarg($arg);
        }

        return $options;
    }
932901
public function getDumpCommand(string $dumpFile): string
    {
        $command = [
            "'{$this->dumpBinaryPath}pg_dump'",
            "-U {$this->userName}",
            '-h '.($this->socket === '' ? $this->host : $this->socket),
            "-p {$this->port}",
        ];

        if ($this->useInserts) {
            $command[] = '--inserts';
        }

        foreach ($this->extraOptions as $extraOption) {
            $command[] = $extraOption;
        }

        if (! empty($this->includeTables)) {
            $command[] = '-t '.implode(' -t ', $this->includeTables);
        }

        if (! empty($this->excludeTables)) {
            $command[] = '-T '.implode(' -T ', $this->excludeTables);
        }

        return $this->echoToFile(implode(' ', $command), $dumpFile);
    }
1267315
function line($line = '')
	{
		$value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];

		// Because killer robots like unicorns!
		if ($value === FALSE)
		{
			log_message('error', 'Could not find the language line "'.$line.'"');
		}

		return $value;
	}
293742
protected function getArtisanLine()
    {
        $command = $this->app['request']->server('argv', []);

        if (is_array($command)) {
            $command = implode(' ', $command);
        }

        return $command;
    }
1201366
public function parseLine($line) {

        $data = explode(";", $line);
        $i    = -1;

        $model = new StartRecordFormat();
        $model->setVersionRecordStructure(IntegerHelper::parseString($data[++$i]));
        $model->setFacilityNumber(IntegerHelper::parseString($data[++$i]));
        $model->setDateFile($this->decodeDate($data[++$i]));
        $model->setNumberRecords(IntegerHelper::parseString($data[++$i]));
        $model->setCurrency($this->decodeString($data[++$i]));

        return $model;
    }
1022953
public function _processClassDocLine($line)
    {
        $result = null;
        if (preg_match(self::PATTERN_METHOD, $line, $matches)) {
            /* parse and transform template's data */
            $isRequired = true;
            $returnType = $matches[1];
            /* replace '|null' in the end of the return type and mark as not required */
            $key = '|null';
            $length = strlen($key);
            if (substr($returnType, -$length, $length) == $key) {
                $returnType = str_replace($key, '', $returnType);
                $isRequired = false;
            }
            $methodName = lcfirst($matches[2]);
            $paramsCount = $this->_getRequiredParamsCount($matches[3]);
            $desc = $matches[4]??'';
            $desc = trim($desc);
            /* compose result  */
            $result = new \Praxigento\Core\App\Reflection\Data\Method();
            $result->setName($methodName);
            $result->setIsRequired($isRequired);
            $result->setType($returnType);
            $result->setDescription($desc);
            $result->setParameterCount($paramsCount);
        }
        return $result;
    }