MWNamespace::hasGenderDistinction( $namespace )
) {
- //NOTE: we are assuming here that the title text is a user name!
+ // NOTE: we are assuming here that the title text is a user name!
$gender = $this->genderCache->getGenderOf( $text, __METHOD__ );
$name = $this->language->getGenderNsText( $namespace, $gender );
} else {
* @param int $defaultNamespace
*
* @throws MalformedTitleException If $text is not a valid title string.
- * @return array A mapp with the fields 'interwiki', 'fragment', 'namespace',
+ * @return array A map with the fields 'interwiki', 'fragment', 'namespace',
* 'user_case_dbkey', and 'dbkey'.
*/
public function splitTitleString( $text, $defaultNamespace = NS_MAIN ) {
$m = array();
if ( preg_match( $prefixRegexp, $dbkey, $m ) ) {
$p = $m[1];
- if ( ( $ns = $this->language->getNsIndex( $p ) ) !== false ) {
+ $ns = $this->language->getNsIndex( $p );
+ if ( $ns !== false ) {
# Ordinary namespace
$dbkey = $m[2];
$parts['namespace'] = $ns;
# Disallow Talk:File:x type titles...
throw new MalformedTitleException( 'title-invalid-talk-namespace', $text );
} elseif ( Interwiki::isValidInterwiki( $x[1] ) ) {
- //TODO: get rid of global state!
+ // TODO: get rid of global state!
# Disallow Talk:Interwiki:x type titles...
throw new MalformedTitleException( 'title-invalid-talk-namespace', $text );
}