Twig extension to render type and priority labels

"string An HTML"? Is it wrong?