Phenomenology of the effect of ion irradiation on the work function of metals