Fix all PHPCS excludes

Change-Id: If454a4ef9145ba74dd950b249ee8a0bd6ffb621a
This commit is contained in:
zoranzoki21 2021-03-31 15:18:05 +02:00 committed by Zoranzoki21
parent ffd3f2e9e6
commit 9ed81f5199
2 changed files with 19 additions and 5 deletions

View file

@ -1,10 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />

View file

@ -61,11 +61,17 @@ class SpecialCiteThisPage extends FormSpecialPage {
}
}
/**
* @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
$form->setMethod( 'get' );
$form->setFormIdentifier( 'titleform' );
}
/**
* @return array
*/
protected function getFormFields() {
return [
'page' => [
@ -78,6 +84,10 @@ class SpecialCiteThisPage extends FormSpecialPage {
];
}
/**
* @param array $data
* @return bool
*/
public function onSubmit( array $data ) {
// GET forms are "submitted" on every view, so check
// that some data was put in for page
@ -99,10 +109,15 @@ class SpecialCiteThisPage extends FormSpecialPage {
return $this->prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
}
/** @inheritDoc */
protected function getGroupName() {
return 'pagetools';
}
/**
* @param Title $title
* @param int $revId
*/
private function showCitations( Title $title, $revId ) {
if ( !$revId ) {
$revId = $title->getLatestRevID();
@ -213,14 +228,17 @@ class SpecialCiteThisPage extends FormSpecialPage {
] ) );
}
/** @inheritDoc */
protected function getDisplayFormat() {
return 'ooui';
}
/** @inheritDoc */
public function requiresUnblock() {
return false;
}
/** @inheritDoc */
public function requiresWrite() {
return false;
}