Remove phpcs exclude rules and update PHP code
Change-Id: Ie37deda368a4d163cf324988721033829ae8af77
This commit is contained in:
@@ -53,6 +53,9 @@ class ApiULSSetLanguage extends ApiBase {
|
||||
$this->languageNameUtils = $languageNameUtils;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function execute() {
|
||||
$request = $this->getRequest();
|
||||
if ( !$request->wasPosted() ) {
|
||||
@@ -91,6 +94,9 @@ class ApiULSSetLanguage extends ApiBase {
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getAllowedParams() {
|
||||
return [
|
||||
'languagecode' => [
|
||||
@@ -99,11 +105,17 @@ class ApiULSSetLanguage extends ApiBase {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function isInternal() {
|
||||
// Try to scare people away from using this externally
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function needsToken() {
|
||||
return 'csrf';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user