src/main/php/CommandLine/Library/GenericCommandRunner.php
public function runBlacklistCommand(
        string $template,
        string $blacklistToken,
        string $prefix = '',
        string $glue = ',',
        bool $escape = false
    ) {
        $blackList = $this->blacklistFactory->build($blacklistToken);
        if ($escape) {
            $blackList = array_map(
                function ($value) {
                    return preg_quote(preg_quote($value, '/'), '/');
                },
                $blackList
            );
        }
        $argument = $prefix . implode($glue . $prefix, $blackList);

        $command = $this->buildCommand($template, $argument);

        return $this->runAndWriteToOutput($command);
    }
public function runBlacklistCommand(
        string $template,
        string $blacklistToken,
        string $prefix = '',
        string $glue = ',',
        bool $escape = false
    ) {
        $blackList = $this->blacklistFactory->build($blacklistToken);
        if ($escape) {
            $blackList = array_map(
                function ($value) {
                    return preg_quote(preg_quote($value, '/'), '/');
                },
                $blackList
            );
        }
        $argument = $prefix . implode($glue . $prefix, $blackList);

        $command = $this->buildCommand($template, $argument);

        return $this->runAndWriteToOutput($command);
    }
public function runBlacklistCommand ( string $ template , string $ blacklistToken , string $ prefix = '' , string $ glue = ',' , bool $ escape = false ) { $ blackList = $ this -> blacklistFactory -> build ( $ blacklistToken ) ; if ( $ escape ) { $ blackList = array_map ( function ( $ value ) { return preg_quote ( preg_quote ( $ value , '/' ) , '/' ) ; } , $ blackList ) ; } $ argument = $ prefix . implode ( $ glue . $ prefix , $ blackList ) ; $ command = $ this -> buildCommand ( $ template , $ argument ) ; return $ this -> runAndWriteToOutput ( $ command ) ; }
Builds a CLI-Command by inserting a blacklist of file paths in the command template and executes it.

@param string $template
@param string $blacklistToken
@param string $prefix
@param string $glue
@param bool   $escape if true the blacklist entries will be escaped for regexp

@return int|null
Builds a CLI - Command by inserting a blacklist of file paths in the command template and executes it .