Mock of the t() function that does no translation.

@param $string
@param array $args
@param array $options

@return \Drupal\Core\StringTranslation\TranslatableMarkup
552828
public function translate($string, array $args = [], array $options = [])
    {
        $translation = new TranslationManager(new LanguageDefault([]));

        return new TranslatableMarkup($string, $args, $options, $translation);
    }
1205846
public function obfuscate(string $string, array $options = []): string
    {
        $options = array_merge([
            'start'       => 0,
            'end'         => 3,
            'replacement' => '*',
        ], $options);

        return StringUtils::obfuscate($string, $options['start'], $options['end'], $options['replacement']);
    }
634350
public function execute(array $args, array $options = [])
    {
        $this->bootstrap($args, $options);

        $format = isset($options['format']) ? $options['format'] : $options['f'];

        if (null !== $format) {
            Output::writeln('using format ' . $format);
        }

        $this->getManager()->printStatus($format);
    }
16574
public static function formatString($str, $args)
    {
        foreach ($args as $k => $v) {
            $str = preg_replace('/:'. $k. ':/', $v, $str);
        }
        return $str;
    }
626506
protected function argumentsToString($args)
    {
        $count = 0;

        $isAssoc = $args !== array_values($args);

        foreach ($args as $key => $value) {
            $count++;
            if ($count >= 5) {
                if ($count > 5) {
                    unset($args[$key]);
                } else {
                    $args[$key] = '...';
                }
                continue;
            }

            if (is_object($value)) {
                $args[$key] = get_class($value);
            } elseif (is_bool($value)) {
                $args[$key] = $value ? 'true' : 'false';
            } elseif (is_string($value)) {
                if (strlen($value) > 64) {
                    $args[$key] = '"' . substr($value, 0, 64) . '..."';
                } else {
                    $args[$key] = '"' . $value . '"';
                }
            } elseif (is_array($value)) {
                $args[$key] = 'array(' . $this->argumentsToString($value) . ')';
            } elseif ($value === null) {
                $args[$key] = 'null';
            } elseif (is_resource($value)) {
                $args[$key] = 'resource';
            }

            if (is_string($key)) {
                $args[$key] = '"' . $key . '" => ' . $args[$key];
            } elseif ($isAssoc) {
                $args[$key] = $key . ' => ' . $args[$key];
            }
        }
        $out = implode(", ", $args);

        return $out;
    }
462636
public function execute(array $args, array $options = [])
    {
        $template = isset($options['template']) ? $options['template'] : false;
        $template || $template = __DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'Controller.php.dist';

        $name = $args[0];
        $name = explode('-', $name);
        if (count($name) < 1) {
            throw new \InvalidArgumentException(sprintf(
                'The arg name "%s" is invalid. eg: adminbase-Blog/Category',
                $name
            ));
        }
        $namespace = str_replace('/', '\\', trim(trim($name[0], '\\/')));

        $path = Cml::getApplicationDir('apps_path') . DIRECTORY_SEPARATOR . $namespace . DIRECTORY_SEPARATOR
            . Cml::getApplicationDir('app_controller_path_name') . DIRECTORY_SEPARATOR;
        $component = explode('/', trim(trim($name[1], '/')));

        if (count($component) > 1) {
            $className = ucfirst(array_pop($component)) . Config::get('controller_suffix');
            $component = implode(DIRECTORY_SEPARATOR, $component);
            $path .= $component . DIRECTORY_SEPARATOR;
            $component = '\\' . $component;
        } else {
            $className = ucfirst($component[0]) . Config::get('controller_suffix');
            $component = '';
        }

        if (!is_dir($path) && false == mkdir($path, 0700, true)) {
            throw new \RuntimeException(sprintf(
                'The path "%s" could not be create',
                $path
            ));
        }

        $contents = strtr(file_get_contents($template), ['$namespace' => $namespace, '$component' => $component, '$className' => $className]);

        $file = $path . $className . '.php';
        if (is_file($file)) {
            throw new \RuntimeException(sprintf(
                'The file "%s" is exist',
                $file
            ));
        }

        if (false === file_put_contents($file, $contents)) {
            throw new \RuntimeException(sprintf(
                'The file "%s" could not be written to',
                $path
            ));
        }

        Output::writeln(Colour::colour('Controller created successfully. ', Colour::GREEN));
    }
660047
@Override
    public String execute(String[] options) {

        if (this.tcapStacks == null || this.tcapStacks.size() == 0) {
            logger.warn("TCAPStackImpl not set. Command will not be executed ");
            return TCAPAnsiOAMMessage.SERVER_ERROR;
        }

        // At least 1 option is passed?
        if (options == null || options.length < 2) {
            return TCAPAnsiOAMMessage.INVALID_COMMAND;
        }

        String firstOption = options[1];

        if (firstOption == null) {
            return TCAPAnsiOAMMessage.INVALID_COMMAND;
        }

        try {
            if (firstOption.equals("set")) {
                return this.manageSet(options);
            } else if (firstOption.equals("get")) {
                return this.manageGet(options);
            }
            // } catch (Exception e) {
            // logger.error(String.format("Error while executing command %s", Arrays.toString(options)), e);
            // return e.getMessage();
        } catch (Throwable t) {
            logger.error(String.format("Error while executing comand %s", Arrays.toString(options)), t);
            return t.getMessage();
        }

        return TCAPAnsiOAMMessage.INVALID_COMMAND;
    }
514236
public function sprintf(string $string, ...$params): string
    {
        preg_match_all('/\:([A-Za-z0-9_]+)/', $string, $matches);
        $matches = $matches[1];

        if (count($matches)) {
            $tokens   = [];
            $replaces = [];

            foreach ($matches as $key => $value) {
                if (count($params) > 1 || !is_array($params[0])) {
                    if (!array_key_exists($key, $params)) {
                        throw new Exception('Too few arguments, missing argument: ' . $key);
                    }
                    $replaces[] = $params[$key];
                } else {
                    if (!array_key_exists($value, $params[0])) {
                        throw new Exception('Missing array argument: ' . $key);
                    }
                    $replaces[] = $params[0][$value];
                }
                $tokens[] = ':' . $value;
            }

            $string = str_replace($tokens, $replaces, $string);
        }

        return $string;
    }
701960
public function iRunPhpdoc($argumentsString = '')
    {
        $argumentsString .= ' --template=xml';
        $argumentsString = strtr($argumentsString, array('\'' => '"'));

        // the app is always run in debug mode to catch debug information and collect the AST that is written to disk
        $this->process->setCommandLine(
            sprintf('%s %s %s', 'php', escapeshellarg($this->binaryPath), $argumentsString . ' -vvv')
        );
        $this->process->start();
        $this->process->wait();
    }
265853
public function translate($string, $namespace, $arguments = array())
    {
        // Load the language file for the given namespace if the language file isn't loaded
        if (!isset($this->translatedStrings[$namespace]) || !is_array($this->translatedStrings[$namespace])) {
            $this->loadLanguageFileForNamespace($namespace);
        }
        
        // If no translation for the original string is available or the string is not translated 
        // return the original string to the caller.
        if (!isset($this->translatedStrings[$namespace][$string]) || $this->translatedStrings[$namespace][$string] == '') {
            return $this->replacePlaceholders($string, $arguments);
        }
        
        return $this->replacePlaceholders($this->translatedStrings[$namespace][$string], $arguments);
    }
690316
public Output compileString(String string, Options options) throws CompilationException {
    return compileString(string, null, null, options);
  }
95801
public function parse($string)
    {
        if (! $this->isSupports($string)) throw new \InvalidArgumentException('invalid string.');

        $define = new OptionDefine();
        preg_match($this->regexp_option, $string, $matches);

        // optional | required
        if ($matches[1] === 'require') $define->required();

        // long-name
        $define->setName($this->pickName($matches[2]));
        
        // short-name
        $define->setShortName($this->pickShortName($matches[2]));

        // defalt value
        $define->setDefault($this->pickValue($define, $matches[2]));
        
        // description
        $define->setDescription($this->pickDescription($matches));

        return $define;
    }
153603
public static function Format ($str = '', array $args = []) {
		foreach ($args as $key => $value) {
			$pos = strpos($str, '{'.$key.'}');
			if ($pos !== FALSE)
				$str = substr($str, 0, $pos) . $value . substr($str, $pos + strlen($key) + 2);
		}
		return $str;
	}
487700
public static function createFromString(string $string): CurrencyPairContract
    {
        $matches = [];
        if (!preg_match('#^([A-Z0-9]{3,})\/([A-Z0-9]{3,})$#', $string, $matches)) {
            throw new \InvalidArgumentException('The currency pair must be in the form "EUR/USD".');
        }

        $parts = explode('/', $string);

        return new self($parts[0], $parts[1]);
    }
1054286
public static function get($i18n, $text, $options = []) {
		if (is_array($text)) {
			$result = [];
			foreach ($text as $v) {
				$result[] = self::getOne($i18n, $v, $options);
			}
			return implode('', $result);
		} else {
			return self::getOne($i18n, $text, $options);
		}
		return $text;
	}
1243388
public function trans(string $key, array $args = [], $lang = '')
    {
        return $this->translate($key, $args, $lang);
    }
487567
public function deserialize($string, array $options=[])
    {
        if (!is_string($string)) {
            throw new UnexpectedValueException('I can only work with strings, not ' . Type::of($string));
        }

        return $string;
    }