diff --git a/includes/Api/ApiULSSetLanguage.php b/includes/Api/ApiULSSetLanguage.php index 18a5cc06..d5fc2047 100644 --- a/includes/Api/ApiULSSetLanguage.php +++ b/includes/Api/ApiULSSetLanguage.php @@ -67,7 +67,7 @@ class ApiULSSetLanguage extends ApiBase { } $user = $this->getUser(); - if ( $user->isAnon() ) { + if ( !$user->isRegistered() ) { if ( $this->getConfig()->get( 'ULSAnonCanChangeLanguage' ) ) { // Anonymous users can change language. // Use a cookie that also can changed by JavaScript. diff --git a/includes/Hooks.php b/includes/Hooks.php index c2a17acb..2493ea7a 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -205,7 +205,7 @@ class Hooks implements $this->statsdDataFactory->increment( 'uls.setlang_used' ); $user = $out->getUser(); - if ( $user->isAnon() && !$out->getConfig()->get( 'ULSAnonCanChangeLanguage' ) ) { + if ( !$user->isRegistered() && !$out->getConfig()->get( 'ULSAnonCanChangeLanguage' ) ) { // User is anon, and cannot change language, return. return; } @@ -290,7 +290,7 @@ class Hooks implements } /** - * @param array $preferred + * @param float[] $preferred * @return string */ protected function getDefaultLanguage( array $preferred ) { diff --git a/includes/ResourceLoaderULSModule.php b/includes/ResourceLoaderULSModule.php index e5ed6f15..901e3752 100644 --- a/includes/ResourceLoaderULSModule.php +++ b/includes/ResourceLoaderULSModule.php @@ -35,7 +35,7 @@ class ResourceLoaderULSModule extends ResourceLoaderModule { /** * Get all the dynamic data for the content language to an array. * - * @param string $languageCode Language code + * @param string $languageCode * @return array */ private function getData( $languageCode ) { diff --git a/scripts/compile-font-repo.php b/scripts/compile-font-repo.php index 03b467c0..e8f08c69 100644 --- a/scripts/compile-font-repo.php +++ b/scripts/compile-font-repo.php @@ -1,6 +1,5 @@