From 30b05e1072b5f4571e10447419e19ee7e4db55d4 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Tue, 26 Feb 2019 13:57:24 +0100 Subject: [PATCH] Replace lowercase {@inheritdoc} with @inheritDoc According to the coding standards we even enforce with a custom PHPCS sniff. It currently does not pick these mistakes up because of the curly brackets. I'm not sure if this is worth an update of the PHPCS sniff. I wanted to suggest this fix anyway. Change-Id: I9041ea7a00baf7f55e0ff0e56879a89fb74bb479 --- .../block/Restriction/AbstractRestriction.php | 18 +++++++++--------- .../block/Restriction/NamespaceRestriction.php | 6 +++--- includes/block/Restriction/PageRestriction.php | 8 ++++---- includes/htmlform/fields/HTMLExpiryField.php | 8 ++++---- includes/specials/formfields/Licenses.php | 2 +- includes/widget/ExpiryInputWidget.php | 2 +- .../Restriction/NamespaceRestrictionTest.php | 2 +- .../block/Restriction/PageRestrictionTest.php | 2 +- .../includes/specials/SpecialBlockTest.php | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/includes/block/Restriction/AbstractRestriction.php b/includes/block/Restriction/AbstractRestriction.php index c89ed72b1e..20678ad0c1 100644 --- a/includes/block/Restriction/AbstractRestriction.php +++ b/includes/block/Restriction/AbstractRestriction.php @@ -57,28 +57,28 @@ abstract class AbstractRestriction implements Restriction { } /** - * {@inheritdoc} + * @inheritDoc */ public static function getType() { return static::TYPE; } /** - * {@inheritdoc} + * @inheritDoc */ public static function getTypeId() { return static::TYPE_ID; } /** - * {@inheritdoc} + * @inheritDoc */ public function getBlockId() { return $this->blockId; } /** - * {@inheritdoc} + * @inheritDoc */ public function setBlockId( $blockId ) { $this->blockId = (int)$blockId; @@ -87,21 +87,21 @@ abstract class AbstractRestriction implements Restriction { } /** - * {@inheritdoc} + * @inheritDoc */ public function getValue() { return $this->value; } /** - * {@inheritdoc} + * @inheritDoc */ public static function newFromRow( \stdClass $row ) { return new static( $row->ir_ipb_id, $row->ir_value ); } /** - * {@inheritdoc} + * @inheritDoc */ public function toRow() { return [ @@ -112,14 +112,14 @@ abstract class AbstractRestriction implements Restriction { } /** - * {@inheritdoc} + * @inheritDoc */ public function equals( Restriction $other ) { return $this->getHash() === $other->getHash(); } /** - * {@inheritdoc} + * @inheritDoc */ public function getHash() { return $this->getType() . '-' . $this->getValue(); diff --git a/includes/block/Restriction/NamespaceRestriction.php b/includes/block/Restriction/NamespaceRestriction.php index bf9769f4d1..8d86853435 100644 --- a/includes/block/Restriction/NamespaceRestriction.php +++ b/includes/block/Restriction/NamespaceRestriction.php @@ -25,17 +25,17 @@ namespace MediaWiki\Block\Restriction; class NamespaceRestriction extends AbstractRestriction { /** - * {@inheritdoc} + * @inheritDoc */ const TYPE = 'ns'; /** - * {@inheritdoc} + * @inheritDoc */ const TYPE_ID = 2; /** - * {@inheritdoc} + * @inheritDoc */ public function matches( \Title $title ) { return $this->getValue() === $title->getNamespace(); diff --git a/includes/block/Restriction/PageRestriction.php b/includes/block/Restriction/PageRestriction.php index 5d3fabb386..ea73d19b13 100644 --- a/includes/block/Restriction/PageRestriction.php +++ b/includes/block/Restriction/PageRestriction.php @@ -25,12 +25,12 @@ namespace MediaWiki\Block\Restriction; class PageRestriction extends AbstractRestriction { /** - * {@inheritdoc} + * @inheritDoc */ const TYPE = 'page'; /** - * {@inheritdoc} + * @inheritDoc */ const TYPE_ID = 1; @@ -40,7 +40,7 @@ class PageRestriction extends AbstractRestriction { protected $title; /** - * {@inheritdoc} + * @inheritDoc */ public function matches( \Title $title ) { if ( !$this->getTitle() ) { @@ -84,7 +84,7 @@ class PageRestriction extends AbstractRestriction { } /** - * {@inheritdoc} + * @inheritDoc */ public static function newFromRow( \stdClass $row ) { $restriction = parent::newFromRow( $row ); diff --git a/includes/htmlform/fields/HTMLExpiryField.php b/includes/htmlform/fields/HTMLExpiryField.php index fb0ca77254..5866d97c46 100644 --- a/includes/htmlform/fields/HTMLExpiryField.php +++ b/includes/htmlform/fields/HTMLExpiryField.php @@ -25,7 +25,7 @@ class HTMLExpiryField extends HTMLFormField { } /** - * {@inheritdoc} + * @inheritDoc * * Use whatever the relative field is as the standard HTML input. */ @@ -38,7 +38,7 @@ class HTMLExpiryField extends HTMLFormField { } /** - * {@inheritdoc} + * @inheritDoc */ protected function getOOUIModules() { return array_merge( @@ -50,7 +50,7 @@ class HTMLExpiryField extends HTMLFormField { } /** - * {@inheritdoc} + * @inheritDoc */ public function getInputOOUI( $value ) { return new ExpiryInputWidget( @@ -63,7 +63,7 @@ class HTMLExpiryField extends HTMLFormField { } /** - * {@inheritdoc} + * @inheritDoc */ public function loadDataFromRequest( $request ) { return $this->relativeField->loadDataFromRequest( $request ); diff --git a/includes/specials/formfields/Licenses.php b/includes/specials/formfields/Licenses.php index 51e63d9dd0..204b0338da 100644 --- a/includes/specials/formfields/Licenses.php +++ b/includes/specials/formfields/Licenses.php @@ -214,7 +214,7 @@ class Licenses extends HTMLFormField { } /** - * {@inheritdoc} + * @inheritDoc */ public function getInputHTML( $value ) { $this->selected = $value; diff --git a/includes/widget/ExpiryInputWidget.php b/includes/widget/ExpiryInputWidget.php index 289cc85ba4..be6e676120 100644 --- a/includes/widget/ExpiryInputWidget.php +++ b/includes/widget/ExpiryInputWidget.php @@ -54,7 +54,7 @@ class ExpiryInputWidget extends Widget { } /** - * {@inheritdoc} + * @inheritDoc */ public function getConfig( &$config ) { $config['required'] = $this->required; diff --git a/tests/phpunit/includes/block/Restriction/NamespaceRestrictionTest.php b/tests/phpunit/includes/block/Restriction/NamespaceRestrictionTest.php index 4356240f20..8f54789fec 100644 --- a/tests/phpunit/includes/block/Restriction/NamespaceRestrictionTest.php +++ b/tests/phpunit/includes/block/Restriction/NamespaceRestrictionTest.php @@ -29,7 +29,7 @@ class NamespaceRestrictionTest extends RestrictionTestCase { } /** - * {@inheritdoc} + * @inheritDoc */ protected function getClass() { return NamespaceRestriction::class; diff --git a/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php b/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php index ff68e6f320..c547878760 100644 --- a/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php +++ b/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php @@ -61,7 +61,7 @@ class PageRestrictionTest extends RestrictionTestCase { } /** - * {@inheritdoc} + * @inheritDoc */ protected function getClass() { return PageRestriction::class; diff --git a/tests/phpunit/includes/specials/SpecialBlockTest.php b/tests/phpunit/includes/specials/SpecialBlockTest.php index 8c8e2704e6..91f12f4f46 100644 --- a/tests/phpunit/includes/specials/SpecialBlockTest.php +++ b/tests/phpunit/includes/specials/SpecialBlockTest.php @@ -12,7 +12,7 @@ use Wikimedia\TestingAccessWrapper; */ class SpecialBlockTest extends SpecialPageTestBase { /** - * {@inheritdoc} + * @inheritDoc */ protected function newSpecialPage() { return new SpecialBlock(); -- 2.20.1