Page MenuHomePhabricator

Rename class & restructure the execution of methods within MobileFrontendSkinHooks class
Open, MediumPublic

Description

The methods getTermsLink, getPluralLicenseInfo, getLicense, getDesktopViewLink, getMobileViewLink , getLicenseText all relate to the footer and is only used inside MobileFrontendHooks::onSkinAddFooterLinks so having a new class with a name like Hooks\MobileSkinAddFooterLinks and then running execute/runHook inside MobileFrontendHooks::onSkinAddFooterLinks would make more sense there like so:

public static function onSkinAddFooterLinks( Skin $skin, string $key, array &$footerLinks ) {
    $hook = new Hooks\MobileSkinAddFooterLinks();
    $hook->runHook( $skin, $key, &$footerLinks );
}