From: Siebrand Mazeland Date: Mon, 21 Apr 2014 09:29:55 +0000 (+0200) Subject: Make includes/title pass phpcs-strict X-Git-Tag: 1.31.0-rc.0~16131 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=5ada01a91991f95cea2a38dc93ecdabf04c928df;p=lhc%2Fweb%2Fwiklou.git Make includes/title pass phpcs-strict Change-Id: Iac03d1f3d4ee622496b3cb0bf8086d2f362b52af --- diff --git a/includes/title/MediaWikiTitleCodec.php b/includes/title/MediaWikiTitleCodec.php index 288c1d9e3a..32448b2db7 100644 --- a/includes/title/MediaWikiTitleCodec.php +++ b/includes/title/MediaWikiTitleCodec.php @@ -54,7 +54,9 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { * @param GenderCache $genderCache the gender cache for generating gendered namespace names * @param string[]|string $localInterwikis */ - public function __construct( Language $language, GenderCache $genderCache, $localInterwikis = array() ) { + public function __construct( Language $language, GenderCache $genderCache, + $localInterwikis = array() + ) { $this->language = $language; $this->genderCache = $genderCache; $this->localInterwikis = (array)$localInterwikis; @@ -219,7 +221,11 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { # Note: use of the /u option on preg_replace here will cause # input with invalid UTF-8 sequences to be nullified out in PHP 5.2.x, # conveniently disabling them. - $dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey ); + $dbkey = preg_replace( + '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', + '_', + $dbkey + ); $dbkey = trim( $dbkey, '_' ); if ( strpos( $dbkey, UTF8_REPLACEMENT ) !== false ) {