$domain ??= 'messages';
$this->catalogue->
set($message,
$this->messagePrefix.
$message,
$domain);
$metadata =
$this->catalogue->
getMetadata($message,
$domain) ??
[];
$normalizedFilename =
preg_replace('{[\\\\/]+}', '/',
$this->file
);
$metadata['sources'
][] =
$normalizedFilename.':'.
$line;
$this->catalogue->
setMetadata($message,
$metadata,
$domain);
} protected function getStringArguments(Node\Expr\CallLike|Node\Attribute|Node\Expr\New_
$node, int|string
$index, bool
$indexIsRegex = false
): array
{ if (\
is_string($index)) { return $this->
getStringNamedArguments($node,
$index,
$indexIsRegex);
} $args =
$node instanceof Node\Expr\CallLike ?
$node->
getRawArgs() :
$node->args;
if (!
($arg =
$args[$index] ?? null
) instanceof Node\Arg
) { return [];
} return (array) $this->
getStringValue($arg->value
);
}