Merge "Fix broken PHPDoc comments that don't start with /**"

This commit is contained in:
jenkins-bot 2020-07-23 19:04:42 +00:00 committed by Gerrit Code Review
commit 75c9333ddb
34 changed files with 60 additions and 39 deletions

View file

@ -33,10 +33,10 @@
* it can be compatible with PHP 4, PHP 5 and PHP 7 (without warnings).
*/
class PHPVersionCheck {
/* @var string The number of the MediaWiki version used. */
/** @var string The number of the MediaWiki version used. */
var $mwVersion = '1.36';
/* @var array A mapping of PHP functions to PHP extensions. */
/** @var string[] A mapping of PHP functions to PHP extensions. */
var $functionsExtensionsMapping = array(
'mb_substr' => 'mbstring',
'xml_parser_create' => 'xml',

View file

@ -24,7 +24,7 @@ use Wikimedia\Rdbms\IDatabase;
* Class designed for counting of stats.
*/
class SiteStatsInit {
/* @var IDatabase */
/** @var IDatabase */
private $dbr;
/** @var int */
private $edits;

View file

@ -24,10 +24,10 @@ use MediaWiki\Revision\RevisionRecord;
class RCCacheEntryFactory {
/* @var IContextSource */
/** @var IContextSource */
private $context;
/* @var string[] */
/** @var string[] */
private $messages;
/**

View file

@ -62,7 +62,7 @@ interface IDBAccessObject {
/** @var int Read from the master/quorum */
public const READ_LATEST = 1;
/* @var int Read from the master/quorum and lock out other writers */
/** @var int Read from the master/quorum and lock out other writers */
public const READ_LOCKING = self::READ_LATEST | 2; // READ_LATEST (1) and "LOCK IN SHARE MODE" (2)
/** @var int Read from the master/quorum and lock out other writers and locking readers */

View file

@ -200,7 +200,8 @@ class DifferenceEngine extends ContextSource {
*/
protected $isSlotDiffRenderer = false;
/* A set of options that will be passed to the SlotDiffRenderer upon creation
/**
* A set of options that will be passed to the SlotDiffRenderer upon creation
* @var array
*/
private $slotDiffOptions = [];

View file

@ -4,8 +4,9 @@
* @stable to extend
*/
class CollapsibleFieldsetLayout extends OOUI\FieldsetLayout {
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( array $config = [] ) {
parent::__construct( $config );

View file

@ -6,8 +6,9 @@
class HTMLFormActionFieldLayout extends OOUI\ActionFieldLayout {
use HTMLFormElement;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $fieldWidget, $buttonWidget = false, array $config = [] ) {
parent::__construct( $fieldWidget, $buttonWidget, $config );

View file

@ -6,8 +6,9 @@
class HTMLFormFieldLayout extends OOUI\FieldLayout {
use HTMLFormElement;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $fieldWidget, array $config = [] ) {
parent::__construct( $fieldWidget, $config );

View file

@ -30,8 +30,9 @@ class OOUIHTMLForm extends HTMLForm {
private $oouiErrors;
private $oouiWarnings;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $descriptor, $context = null, $messagePrefix = '' ) {
parent::__construct( $descriptor, $context, $messagePrefix );

View file

@ -35,8 +35,9 @@
class HTMLAutoCompleteSelectField extends HTMLTextField {
protected $autocompleteData = [];
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
$params += [

View file

@ -29,8 +29,9 @@ class HTMLButtonField extends HTMLFormField {
protected $mFormnovalidate = false;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $info ) {
$info['nodata'] = true;

View file

@ -33,8 +33,9 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
'columns'
];
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
$missing = array_diff( self::$requiredParams, array_keys( $params ) );

View file

@ -26,8 +26,9 @@ class HTMLDateTimeField extends HTMLTextField {
protected $mType = 'datetime';
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
parent::__construct( $params );

View file

@ -46,8 +46,9 @@ class HTMLFormFieldCloner extends HTMLFormField {
*/
protected $uniqueId;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
$this->uniqueId = static::class . ++self::$counter . 'x';

View file

@ -23,8 +23,9 @@ class HTMLFormFieldWithButton extends HTMLFormField {
/** @var string[] Value for the button in this field */
protected $mButtonFlags = [ 'progressive' ];
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $info ) {
if ( isset( $info['buttonclass'] ) ) {

View file

@ -6,8 +6,9 @@
class HTMLHiddenField extends HTMLFormField {
protected $outputAsDefault = true;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
parent::__construct( $params );

View file

@ -17,8 +17,9 @@ use Wikimedia\IPUtils;
class HTMLRestrictionsField extends HTMLTextAreaField {
protected const DEFAULT_ROWS = 5;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( array $params ) {
parent::__construct( $params );

View file

@ -16,8 +16,9 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
/** @var string[] */
private $mFlatOptions;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
if ( array_key_exists( 'other', $params ) ) {

View file

@ -9,8 +9,9 @@ use MediaWiki\MediaWikiServices;
*/
class HTMLSelectLanguageField extends HTMLSelectField {
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
parent::__construct( $params );

View file

@ -9,8 +9,9 @@ class HTMLSelectNamespace extends HTMLFormField {
/** @var string|null */
protected $mAllValue;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
parent::__construct( $params );

View file

@ -8,8 +8,9 @@ class HTMLSelectNamespaceWithButton extends HTMLSelectNamespace {
/** @var HTMLFormFieldWithButton */
protected $mClassWithButton = null;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $info ) {
$this->mClassWithButton = new HTMLFormFieldWithButton( $info );

View file

@ -10,8 +10,9 @@
*/
class HTMLSelectOrOtherField extends HTMLTextField {
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
parent::__construct( $params );

View file

@ -8,8 +8,9 @@ class HTMLTextFieldWithButton extends HTMLTextField {
/** @var HTMLFormFieldWithButton */
protected $mClassWithButton = null;
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $info ) {
$this->mClassWithButton = new HTMLFormFieldWithButton( $info );

View file

@ -17,8 +17,9 @@ use MediaWiki\Widget\TitleInputWidget;
* @since 1.26
*/
class HTMLTitleTextField extends HTMLTextField {
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
$params += [

View file

@ -21,8 +21,9 @@ use MediaWiki\Widget\TitlesMultiselectWidget;
* @note This widget is not likely to remain functional in non-OOUI forms.
*/
class HTMLTitlesMultiselectField extends HTMLTitleTextField {
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
$params += [

View file

@ -18,8 +18,9 @@ use Wikimedia\IPUtils;
* @since 1.26
*/
class HTMLUserTextField extends HTMLTextField {
/*
/**
* @stable to call
* @inheritDoc
*/
public function __construct( $params ) {
$params = wfArrayPlus2d( $params, [

View file

@ -1569,7 +1569,7 @@ abstract class DatabaseMysqlBase extends Database {
return 'CAST( ' . $field . ' AS SIGNED )';
}
/*
/**
* @return bool Whether GTID support is used (mockable for testing)
*/
protected function useGTIDs() {

View file

@ -139,7 +139,7 @@ class Article implements Page {
*/
private $revisionStore;
/*
/**
* @var RevisionRecord|null Revision to be shown
*
* Initialized by getOldIDFromRequest() or fetchRevisionRecord(). Normally loaded from the

View file

@ -36,7 +36,7 @@ class UserrightsPage extends SpecialPage {
* @var null|string
*/
protected $mTarget;
/*
/**
* @var null|User $mFetchedUser The user object of the target username or null.
*/
protected $mFetchedUser = null;
@ -88,7 +88,6 @@ class UserrightsPage extends SpecialPage {
*
* @param string|null $par String if any subpage provided, else null
* @throws UserBlockedError|PermissionsError
* @suppress PhanUndeclaredMethod
*/
public function execute( $par ) {
$user = $this->getUser();

View file

@ -630,7 +630,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
$watcherCounts = [];
foreach ( $targetsWithVisitThresholds as list( $target ) ) {
/* @var LinkTarget $target */
/** @var LinkTarget $target */
$watcherCounts[$target->getNamespace()][$target->getDBkey()] = 0;
}
@ -659,7 +659,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
$missingTargets[] = $target;
continue;
}
/* @var LinkTarget $target */
/** @var LinkTarget $target */
$namespaceConds[$target->getNamespace()][] = $db->makeList( [
'wl_title = ' . $db->addQuotes( $target->getDBkey() ),
$db->makeList( [

View file

@ -217,7 +217,7 @@ class PageDataRequestHandlerTest extends \MediaWikiLangTestCase {
$output = $this->makeOutputPage( $params, $headers );
$request = $output->getRequest();
/* @var FauxResponse $response */
/** @var FauxResponse $response */
$response = $request->response();
// construct handler
@ -298,7 +298,7 @@ class PageDataRequestHandlerTest extends \MediaWikiLangTestCase {
array $headers,
$expectedRedirectSuffix
) {
/* @var FauxResponse $response */
/** @var FauxResponse $response */
$output = $this->makeOutputPage( [], $headers );
$request = $output->getRequest();

View file

@ -57,7 +57,7 @@ class WikiPageDbTest extends MediaWikiLangTestCase {
protected function tearDown() : void {
$user = $this->getTestSysop()->getUser();
foreach ( $this->pagesToDelete as $p ) {
/* @var WikiPage $p */
/** @var WikiPage $p */
try {
if ( $p->exists() ) {

View file

@ -117,7 +117,7 @@ class SpecialPageDataTest extends SpecialPageTestBase {
}
try {
/* @var FauxResponse $response */
/** @var FauxResponse $response */
list( $output, $response ) = $this->executeSpecialPage( $subpage, $request );
$this->assertEquals( $expCode, $response->getStatusCode(), "status code" );

View file

@ -1,7 +1,7 @@
<?php
class MockSearchResultSet extends SearchResultSet {
/*
/**
* @var SearchResultSet[][] Map from result type to list of results for
* that type.
*/