How can I refactor based on the name of a function (multiple ifs)

visit shbcf.ru