public function formatName($type, $name, $projectId = null)
{
if (!isset($this->templates[$type])) {
throw new InvalidArgumentException(sprintf('Template `%s` is not defined', $type));
}
return vsprintf($this->templates[$type], [$name, $projectId]);
}