Defining $typeName once should be enough here. :)