Refactor deprecated Twig_Function_Method to Twig_SimpleFunction.