src/Viserio/Component/Translation/Translator.php
protected function filterHelpersFromString(string $translation): array
    {
        $helpers = [];

        if (\preg_match('/^(.*?)\\[(.*?)\\]$/', $translation, $match) === 1) {
            $helpers = \explode('|', $match[2]);
            $helpers = \array_map(static function ($helper) {
                $name = $helper;
                $arguments = [];

                if (\preg_match('/^(.*?)\:(.*)$/', $helper, $match) === 1) {
                    $name = $match[1];
                    $arguments = \explode(':', $match[2]);
                }

                return [
                    'name'      => $name,
                    'arguments' => $arguments,
                ];
            }, $helpers);
        }

        return $helpers;
    }
protected function filterHelpersFromString(string $translation): array
    {
        $helpers = [];

        if (\preg_match('/^(.*?)\\[(.*?)\\]$/', $translation, $match) === 1) {
            $helpers = \explode('|', $match[2]);
            $helpers = \array_map(static function ($helper) {
                $name = $helper;
                $arguments = [];

                if (\preg_match('/^(.*?)\:(.*)$/', $helper, $match) === 1) {
                    $name = $match[1];
                    $arguments = \explode(':', $match[2]);
                }

                return [
                    'name'      => $name,
                    'arguments' => $arguments,
                ];
            }, $helpers);
        }

        return $helpers;
    }
Filter a helper from string.

@param string $translation

@return array