src/Viserio/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php
protected function doEnterNode(Node $node, Environment $env): Node
    {
        if (! $this->enabled) {
            return $node;
        }

        if ($node instanceof FilterExpression &&
            $node->getNode('node') instanceof ConstantExpression &&
            $node->getNode('filter')->getAttribute('value') === 'trans'
        ) {
            // extract constant nodes with a trans filter
            $this->messages[] = [
                $node->getNode('node')->getAttribute('value'),
                $this->getReadDomainFromArguments($node->getNode('arguments'), 1),
            ];
        } elseif ($node instanceof TransNode) {
            // extract trans nodes
            $this->messages[] = [
                $node->getNode('body')->getAttribute('data'),
                $node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null,
            ];
        }

        return $node;
    }
protected function doEnterNode(Node $node, Environment $env): Node
    {
        if (! $this->enabled) {
            return $node;
        }

        if ($node instanceof FilterExpression &&
            $node->getNode('node') instanceof ConstantExpression &&
            $node->getNode('filter')->getAttribute('value') === 'trans'
        ) {
            // extract constant nodes with a trans filter
            $this->messages[] = [
                $node->getNode('node')->getAttribute('value'),
                $this->getReadDomainFromArguments($node->getNode('arguments'), 1),
            ];
        } elseif ($node instanceof TransNode) {
            // extract trans nodes
            $this->messages[] = [
                $node->getNode('body')->getAttribute('data'),
                $node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null,
            ];
        }

        return $node;
    }
{@inheritdoc}