mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-27 08:50:12 +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"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<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>
|
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
<arg name="extensions" value="php" />
|
<arg name="extensions" value="php" />
|
||||||
<arg name="encoding" value="UTF-8" />
|
<arg name="encoding" value="UTF-8" />
|
||||||
|
|
|
@ -61,11 +61,17 @@ class SpecialCiteThisPage extends FormSpecialPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param HTMLForm $form
|
||||||
|
*/
|
||||||
protected function alterForm( HTMLForm $form ) {
|
protected function alterForm( HTMLForm $form ) {
|
||||||
$form->setMethod( 'get' );
|
$form->setMethod( 'get' );
|
||||||
$form->setFormIdentifier( 'titleform' );
|
$form->setFormIdentifier( 'titleform' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
protected function getFormFields() {
|
protected function getFormFields() {
|
||||||
return [
|
return [
|
||||||
'page' => [
|
'page' => [
|
||||||
|
@ -78,6 +84,10 @@ class SpecialCiteThisPage extends FormSpecialPage {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $data
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function onSubmit( array $data ) {
|
public function onSubmit( array $data ) {
|
||||||
// GET forms are "submitted" on every view, so check
|
// GET forms are "submitted" on every view, so check
|
||||||
// that some data was put in for page
|
// that some data was put in for page
|
||||||
|
@ -99,10 +109,15 @@ class SpecialCiteThisPage extends FormSpecialPage {
|
||||||
return $this->prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
|
return $this->prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @inheritDoc */
|
||||||
protected function getGroupName() {
|
protected function getGroupName() {
|
||||||
return 'pagetools';
|
return 'pagetools';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Title $title
|
||||||
|
* @param int $revId
|
||||||
|
*/
|
||||||
private function showCitations( Title $title, $revId ) {
|
private function showCitations( Title $title, $revId ) {
|
||||||
if ( !$revId ) {
|
if ( !$revId ) {
|
||||||
$revId = $title->getLatestRevID();
|
$revId = $title->getLatestRevID();
|
||||||
|
@ -213,14 +228,17 @@ class SpecialCiteThisPage extends FormSpecialPage {
|
||||||
] ) );
|
] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @inheritDoc */
|
||||||
protected function getDisplayFormat() {
|
protected function getDisplayFormat() {
|
||||||
return 'ooui';
|
return 'ooui';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @inheritDoc */
|
||||||
public function requiresUnblock() {
|
public function requiresUnblock() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @inheritDoc */
|
||||||
public function requiresWrite() {
|
public function requiresWrite() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue