  Measurements of the branching fraction ratio ${\cal{B}(\phi \to \mu^+
\mu^-)/\cal{B}(\phi\to e^+e^-)}$ with ${D_{s}^{+} \to \pi^{+} \phi}$ and
${D^{+} \to \pi^{+} \phi}$ decays, denoted $R^{s}_{\phi \pi}$ and $R^{d}_{\phi
\pi}$, are presented. The analysis is performed using a dataset corresponding
to an integrated luminosity of 5.4$\,\rm{fb}^{-1}$ of $pp$ collision data
collected with the LHCb experiment. The branching fractions are normalised with
respect to the ${B^{+} \to K^{+} J/\psi(\to e^+e^-)}$ and ${B^{+} \to K^{+}
J/\psi(\to \mu^+\mu^-)}$ decay modes. The combination of the results yields $$
R_{\phi \pi} = 1.022 \pm 0.012 \,({\rm stat}) \, \pm 0.048 \,({\rm syst}). $$
The result is compatible with previous measurements of the $\phi \to
\ell^{+}\ell^{-}$ branching fractions and predictions based on the Standard
Model.
