specials: Clean up redirect special pages ($subpage can be null)
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 11 Apr 2015 12:57:55 +0000 (13:57 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 13 Apr 2015 19:10:00 +0000 (20:10 +0100)
commitf95dc8faff01792d1059246615a5597fff25e118
treee4d3ae76c1bfeccd05ebab66d67db8970df349f2
parentf074a738b2684cadc27f600988d571ac19a6641e
specials: Clean up redirect special pages ($subpage can be null)

$subpage being null is clearly documented in SpecialPage::run,
SpecialPage::execute, and most special page subclasses.

But all the redirect subclasses only copied part of the typehint,
making it look like it's always a string.

For SpecialMyLanguage, follows-up b1853bba0. Don't cast null to
empty string, and don't bother giving Title::newFromText an empty
string only to bail out with null again.

Also:
* Add visibility 'public' where missing.
* Add or correct relevant documentation comments.
* In SpecialMyRedirectPages, handle error first and avoid having
  final return inside a conditional; Remove redunant 'else'.

Change-Id: Ie3543f44011832b198bb3d3e32528b6a2868dee1
includes/specialpage/RedirectSpecialPage.php
includes/specials/SpecialDiff.php
includes/specials/SpecialFilepath.php
includes/specials/SpecialMyLanguage.php
includes/specials/SpecialMyRedirectPages.php
includes/specials/SpecialPermanentLink.php