`$type` isn't actually used at all in this method, so I think this line can be removed.