Remove duplicate variable name from class property PHPDocs

Repeating the variable name doesn't do anything. Documentation
generators don't need it. It's more stuff to read that doesn't add new
information. And it can become outdated.

Note there are two types of @var docs. When used inline (and not on a
class property) the variable name is needed.

Change-Id: If5a520405efacd8cefd90b878c999b842b91ac61
This commit is contained in:
Thiemo Kreuz 2019-11-29 14:33:43 +01:00 committed by Thiemo Kreuz (WMDE)
parent c387e77b8e
commit 78ca9eff4a
37 changed files with 100 additions and 100 deletions

View file

@ -37,18 +37,18 @@ use MediaWiki\MediaWikiServices;
class AjaxDispatcher {
/**
* The way the request was made, either a 'get' or a 'post'
* @var string $mode
* @var string
*/
private $mode;
/**
* Name of the requested handler
* @var string $func_name
* @var string
*/
private $func_name;
/** Arguments passed
* @var array $args
* @var array
*/
private $args;

View file

@ -31,43 +31,43 @@ use MediaWiki\MediaWikiServices;
class AjaxResponse {
/**
* Number of seconds to get the response cached by a proxy
* @var int $mCacheDuration
* @var int
*/
private $mCacheDuration;
/**
* HTTP header Content-Type
* @var string $mContentType
* @var string
*/
private $mContentType;
/**
* Disables output. Can be set by calling $AjaxResponse->disable()
* @var bool $mDisabled
* @var bool
*/
private $mDisabled;
/**
* Date for the HTTP header Last-modified
* @var string|bool $mLastModified
* @var string|bool
*/
private $mLastModified;
/**
* HTTP response code
* @var int|string $mResponseCode
* @var int|string
*/
private $mResponseCode;
/**
* HTTP Vary header
* @var string $mVary
* @var string
*/
private $mVary;
/**
* Content of our HTTP response
* @var string $mText
* @var string
*/
private $mText;

View file

@ -41,21 +41,21 @@ abstract class Action implements MessageLocalizer {
/**
* Page on which we're performing the action
* @since 1.17
* @var WikiPage|Article|ImagePage|CategoryPage|Page $page
* @var WikiPage|Article|ImagePage|CategoryPage|Page
*/
protected $page;
/**
* IContextSource if specified; otherwise we'll use the Context from the Page
* @since 1.17
* @var IContextSource $context
* @var IContextSource
*/
protected $context;
/**
* The fields used to create the HTMLForm
* @since 1.17
* @var array $fields
* @var array
*/
protected $fields;

View file

@ -28,13 +28,13 @@ use MediaWiki\Revision\RevisionRecord;
*/
class ApiParse extends ApiBase {
/** @var string $section */
/** @var string */
private $section = null;
/** @var Content $content */
/** @var Content */
private $content = null;
/** @var Content $pstContent */
/** @var Content */
private $pstContent = null;
/** @var bool */

View file

@ -77,7 +77,7 @@ class MessageCache implements LoggerAwareInterface {
/**
* Should mean that database cannot be used, but check
* @var bool $mDisable
* @var bool
*/
protected $mDisable;
@ -90,7 +90,7 @@ class MessageCache implements LoggerAwareInterface {
protected $mParser;
/**
* @var bool $mInParser
* @var bool
*/
protected $mInParser = false;

View file

@ -32,7 +32,7 @@ class ChangesListBooleanFilter extends ChangesListFilter {
/**
* Main unstructured UI i18n key
*
* @var string $showHide
* @var string
*/
protected $showHide;
@ -40,28 +40,28 @@ class ChangesListBooleanFilter extends ChangesListFilter {
* Whether there is a feature designed to replace this filter available on the
* structured UI
*
* @var bool $isReplacedInStructuredUi
* @var bool
*/
protected $isReplacedInStructuredUi;
/**
* Default
*
* @var bool $defaultValue
* @var bool
*/
protected $defaultValue;
/**
* Callable used to do the actual query modification; see constructor
*
* @var callable $queryCallable
* @var callable
*/
protected $queryCallable;
/**
* Value that defined when this filter is considered active
*
* @var bool $activeValue
* @var bool
*/
protected $activeValue;

View file

@ -30,7 +30,7 @@ abstract class ChangesListFilter {
/**
* Filter name
*
* @var string $name
* @var string
*/
protected $name;
@ -40,35 +40,35 @@ abstract class ChangesListFilter {
* In this example, if bot actions are included in the result set, this CSS class
* will then be included in all bot-flagged actions.
*
* @var string|null $cssClassSuffix
* @var string|null
*/
protected $cssClassSuffix;
/**
* Callable that returns true if and only if a row is attributed to this filter
*
* @var callable $isRowApplicableCallable
* @var callable
*/
protected $isRowApplicableCallable;
/**
* Group. ChangesListFilterGroup this belongs to
*
* @var ChangesListFilterGroup $group
* @var ChangesListFilterGroup
*/
protected $group;
/**
* i18n key of label for structured UI
*
* @var string $label
* @var string
*/
protected $label;
/**
* i18n key of description for structured UI
*
* @var string $description
* @var string
*/
protected $description;
@ -76,7 +76,7 @@ abstract class ChangesListFilter {
* Array of associative arrays with conflict information. See
* setUnidirectionalConflict
*
* @var array $conflictingGroups
* @var array
*/
protected $conflictingGroups = [];
@ -84,27 +84,27 @@ abstract class ChangesListFilter {
* Array of associative arrays with conflict information. See
* setUnidirectionalConflict
*
* @var array $conflictingFilters
* @var array
*/
protected $conflictingFilters = [];
/**
* Array of associative arrays with subset information
*
* @var array $subsetFilters
* @var array
*/
protected $subsetFilters = [];
/**
* Priority integer. Higher value means higher up in the group's filter list.
*
* @var string $priority
* @var string
*/
protected $priority;
/**
*
* @var string $defaultHighlightColor
* @var string
*/
protected $defaultHighlightColor;

View file

@ -38,49 +38,49 @@ abstract class ChangesListFilterGroup {
/**
* Name (internal identifier)
*
* @var string $name
* @var string
*/
protected $name;
/**
* i18n key for title
*
* @var string $title
* @var string
*/
protected $title;
/**
* i18n key for header of What's This?
*
* @var string|null $whatsThisHeader
* @var string|null
*/
protected $whatsThisHeader;
/**
* i18n key for body of What's This?
*
* @var string|null $whatsThisBody
* @var string|null
*/
protected $whatsThisBody;
/**
* URL of What's This? link
*
* @var string|null $whatsThisUrl
* @var string|null
*/
protected $whatsThisUrl;
/**
* i18n key for What's This? link
*
* @var string|null $whatsThisLinkText
* @var string|null
*/
protected $whatsThisLinkText;
/**
* Type, from a TYPE constant of a subclass
*
* @var string $type
* @var string
*/
protected $type;
@ -88,14 +88,14 @@ abstract class ChangesListFilterGroup {
* Priority integer. Higher values means higher up in the
* group list.
*
* @var string $priority
* @var string
*/
protected $priority;
/**
* Associative array of filters, as ChangesListFilter objects, with filter name as key
*
* @var array $filters
* @var array
*/
protected $filters;
@ -103,7 +103,7 @@ abstract class ChangesListFilterGroup {
* Whether this group is full coverage. This means that checking every item in the
* group means no changes list (e.g. RecentChanges) entries are filtered out.
*
* @var bool $isFullCoverage
* @var bool
*/
protected $isFullCoverage;
@ -111,7 +111,7 @@ abstract class ChangesListFilterGroup {
* Array of associative arrays with conflict information. See
* setUnidirectionalConflict
*
* @var array $conflictingGroups
* @var array
*/
protected $conflictingGroups = [];
@ -119,7 +119,7 @@ abstract class ChangesListFilterGroup {
* Array of associative arrays with conflict information. See
* setUnidirectionalConflict
*
* @var array $conflictingFilters
* @var array
*/
protected $conflictingFilters = [];

View file

@ -61,14 +61,14 @@ class ChangesListStringOptionsFilterGroup extends ChangesListFilterGroup {
/**
* Defaul parameter value
*
* @var string $defaultValue
* @var string
*/
protected $defaultValue;
/**
* Callable used to do the actual query modification; see constructor
*
* @var callable $queryCallable
* @var callable
*/
protected $queryCallable;

View file

@ -38,7 +38,7 @@ abstract class AbstractContent implements Content {
*
* @since 1.21
*
* @var string $model_id
* @var string
*/
protected $model_id;

View file

@ -51,7 +51,7 @@ use UDPTransport;
class LegacyLogger extends AbstractLogger {
/**
* @var string $channel
* @var string
*/
protected $channel;

View file

@ -37,7 +37,7 @@ namespace MediaWiki\Logger;
class LegacySpi implements Spi {
/**
* @var array $singletons
* @var array
*/
protected $singletons = [];

View file

@ -117,13 +117,13 @@ use Wikimedia\ObjectFactory;
class MonologSpi implements Spi {
/**
* @var array $singletons
* @var array
*/
protected $singletons;
/**
* Configuration for creating new loggers.
* @var array[][] $config
* @var array[][]
*/
protected $config;

View file

@ -39,7 +39,7 @@ use Psr\Log\NullLogger;
class NullSpi implements Spi {
/**
* @var \Psr\Log\NullLogger $singleton
* @var \Psr\Log\NullLogger
*/
protected $singleton;

View file

@ -50,39 +50,39 @@ class LegacyHandler extends AbstractProcessingHandler {
/**
* Log sink descriptor
* @var string $uri
* @var string
*/
protected $uri;
/**
* Filter log events using legacy rules
* @var bool $useLegacyFilter
* @var bool
*/
protected $useLegacyFilter;
/**
* Log sink
* @var resource $sink
* @var resource
*/
protected $sink;
/**
* @var string $error
* @var string
*/
protected $error;
/**
* @var string $host
* @var string
*/
protected $host;
/**
* @var int $port
* @var int
*/
protected $port;
/**
* @var string $prefix
* @var string
*/
protected $prefix;

View file

@ -37,12 +37,12 @@ use Monolog\Logger;
class MwlogHandler extends SyslogUdpHandler {
/**
* @var string $appprefix
* @var string
*/
private $appprefix;
/**
* @var string $hostname
* @var string
*/
private $hostname;

View file

@ -48,12 +48,12 @@ use Monolog\Logger;
class SyslogHandler extends SyslogUdpHandler {
/**
* @var string $appname
* @var string
*/
private $appname;
/**
* @var string $hostname
* @var string
*/
private $hostname;

View file

@ -3,7 +3,7 @@
* Creates a Html::namespaceSelector input field with a button assigned to the input field.
*/
class HTMLSelectNamespaceWithButton extends HTMLSelectNamespace {
/** @var HTMLFormFieldWithButton $mClassWithButton */
/** @var HTMLFormFieldWithButton */
protected $mClassWithButton = null;
public function __construct( $info ) {

View file

@ -3,7 +3,7 @@
* Creates a text input field with a button assigned to the input field.
*/
class HTMLTextFieldWithButton extends HTMLTextField {
/** @var HTMLFormFieldWithButton $mClassWithButton */
/** @var HTMLFormFieldWithButton */
protected $mClassWithButton = null;
public function __construct( $info ) {

View file

@ -187,7 +187,7 @@ class WikiRevision implements ImportableUploadRevision, ImportableOldRevision {
/**
* @deprecated since 1.31, along with self::downloadSource()
* @var Config $config
* @var Config
*/
private $config;

View file

@ -43,7 +43,7 @@ class JobRunner implements LoggerAwareInterface {
protected $debug;
/**
* @var LoggerInterface $logger
* @var LoggerInterface
*/
protected $logger;

View file

@ -27,7 +27,7 @@
* @since 1.27
*/
class ReverseArrayIterator implements Iterator, Countable {
/** @var array $array */
/** @var array */
protected $array;
/**

View file

@ -30,25 +30,25 @@ use Wikimedia\RunningStat;
class XhprofData {
/**
* @var array $config
* @var array
*/
protected $config;
/**
* Hierarchical profiling data returned by xhprof.
* @var array[] $hieraData
* @var array[]
*/
protected $hieraData;
/**
* Per-function inclusive data.
* @var array[][] $inclusive
* @var array[][]
*/
protected $inclusive;
/**
* Per-function inclusive and exclusive data.
* @var array[] $complete
* @var array[]
*/
protected $complete;

View file

@ -54,7 +54,7 @@
*/
class ProfilerXhprof extends Profiler {
/**
* @var XhprofData|null $xhprofData
* @var XhprofData|null
*/
protected $xhprofData;

View file

@ -33,7 +33,7 @@ use UnexpectedValueException;
* @since 1.27
*/
class MetadataMergeException extends UnexpectedValueException {
/** @var array $context */
/** @var array */
protected $context;
/**

View file

@ -31,7 +31,7 @@ abstract class QuickTemplate {
*/
public $data;
/** @var Config $config */
/** @var Config */
protected $config;
/**

View file

@ -85,7 +85,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
* all of the filters in a group can be configured to only display on the
* unstuctured UI, in which case you don't need a group title.
*
* @var array $filterGroupDefinitions
* @var array
*/
private $filterGroupDefinitions;
@ -103,7 +103,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
* Filter groups, and their contained filters
* This is an associative array (with group name as key) of ChangesListFilterGroup objects.
*
* @var ChangesListFilterGroup[] $filterGroups
* @var ChangesListFilterGroup[]
*/
protected $filterGroups = [];

View file

@ -32,14 +32,14 @@ class SpecialAllPages extends IncludableSpecialPage {
/**
* Maximum number of pages to show on single subpage.
*
* @var int $maxPerPage
* @var int
*/
protected $maxPerPage = 345;
/**
* Determines, which message describes the input field 'nsfrom'.
*
* @var string $nsfromMsg
* @var string
*/
protected $nsfromMsg = 'allpagesfrom';

View file

@ -32,7 +32,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
protected $mTarget;
/**
* @var User|string $mTargetObj
* @var User|string
*/
protected $mTargetObj;

View file

@ -37,7 +37,7 @@ class SpecialRedirect extends FormSpecialPage {
*
* Example value: `'user'`
*
* @var string $mType
* @var string
*/
protected $mType;
@ -46,7 +46,7 @@ class SpecialRedirect extends FormSpecialPage {
*
* Example value: `'42'`
*
* @var string $mValue
* @var string
*/
protected $mValue;

View file

@ -33,7 +33,7 @@ class UserrightsPage extends SpecialPage {
* The target of the local right-adjuster's interest. Can be gotten from
* either a GET parameter or a subpage-style parameter, so have a member
* variable for it.
* @var null|string $mTarget
* @var null|string
*/
protected $mTarget;
/*

View file

@ -55,7 +55,7 @@ class BatchRowIterator implements RecursiveIterator {
protected $conditions = [];
/**
* @var array $joinConditions
* @var array
*/
protected $joinConditions = [];

View file

@ -16,19 +16,19 @@ use OOUI;
* the results are from.
*/
class InterwikiSearchResultSetWidget implements SearchResultSetWidget {
/** @var SpecialSearch $specialSearch */
/** @var SpecialSearch */
protected $specialSearch;
/** @var SearchResultWidget $resultWidget */
/** @var SearchResultWidget */
protected $resultWidget;
/** @var string[]|null $customCaptions */
/** @var string[]|null */
protected $customCaptions;
/** @var LinkRenderer $linkRenderer */
/** @var LinkRenderer */
protected $linkRenderer;
/** @var InterwikiLookup $iwLookup */
/** @var InterwikiLookup */
protected $iwLookup;
/** @var \OutputPage $output */
/** @var \OutputPage */
protected $output;
/** @var bool $showMultimedia */
/** @var bool */
protected $showMultimedia;
public function __construct(

View file

@ -10,7 +10,7 @@
class LessFileCompilationTest extends ResourceLoaderTestCase {
/**
* @var string $file
* @var string
*/
protected $file;

View file

@ -14,17 +14,17 @@ use MediaWiki\MediaWikiServices;
class PagePropsTest extends MediaWikiLangTestCase {
/**
* @var Title $title1
* @var Title
*/
private $title1;
/**
* @var Title $title2
* @var Title
*/
private $title2;
/**
* @var array $the_properties
* @var array
*/
private $the_properties;

View file

@ -16,7 +16,7 @@ use MediaWiki\Revision\SlotRecord;
abstract class RevisionDbTestBase extends MediaWikiTestCase {
/**
* @var WikiPage $testPage
* @var WikiPage
*/
private $testPage;

View file

@ -14,13 +14,13 @@ abstract class PageArchiveTestBase extends MediaWikiTestCase {
protected $pageId;
/**
* @var PageArchive $archivedPage
* @var PageArchive
*/
protected $archivedPage;
/**
* A logged out user who edited the page before it was archived.
* @var string $ipEditor
* @var string
*/
protected $ipEditor;