mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-23 15:16:46 +00:00
Fix all PHPCS excludes
Change-Id: If454a4ef9145ba74dd950b249ee8a0bd6ffb621a
This commit is contained in:
parent
ffd3f2e9e6
commit
9ed81f5199
|
@ -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" />
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue