Remove documentation that literally repeats the code
For example, documenting the method getUser() with "get the User object" does not add any information that's not already there. But I have to read the text first to understand that it doesn't document anything that's not already obvious from the code. Some of this is from a time when we had a PHPCS sniff that was complaining when a line like `@param User $user` doesn't end with some descriptive text. Some users started adding text like `@param User $user The User` back then. Let's please remove this. Change-Id: I0ea8d051bc732466c73940de9259f87ffb86ce7a
This commit is contained in:
parent
f4a77a5760
commit
1fc8d79ac6
92 changed files with 48 additions and 172 deletions
|
|
@ -514,9 +514,7 @@ class EditPage implements IEditObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the context Title object
|
||||
*
|
||||
* @param Title|null $title Title object or null
|
||||
* @param Title|null $title
|
||||
*/
|
||||
public function setContextTitle( $title ) {
|
||||
$this->mContextTitle = $title;
|
||||
|
|
@ -3822,9 +3820,6 @@ ERROR;
|
|||
$this->context->getOutput()->addHTML( '<div id="wikiDiff">' . $difftext . '</div>' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the header copyright warning.
|
||||
*/
|
||||
protected function showHeaderCopyrightWarning() {
|
||||
$msg = 'editpage-head-copy-warn';
|
||||
if ( !$this->context->msg( $msg )->isDisabled() ) {
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ function wfMergeErrorArrays( ...$args ) {
|
|||
/**
|
||||
* Insert array into another array after the specified *KEY*
|
||||
*
|
||||
* @param array $array The array.
|
||||
* @param array $array
|
||||
* @param array $insert The array to insert.
|
||||
* @param mixed $after The key to insert after. Callers need to make sure the key is set.
|
||||
* @return array
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ interface BeforeInitializeHook {
|
|||
* @since 1.35
|
||||
*
|
||||
* @param Title $title Title being used for request
|
||||
* @param null $unused Null
|
||||
* @param null $unused
|
||||
* @param OutputPage $output
|
||||
* @param User $user
|
||||
* @param WebRequest $request
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ interface FileDeleteCompleteHook {
|
|||
* @param WikiFilePage $article In case all revisions of the file are deleted, a reference to
|
||||
* the WikiFilePage associated with the file
|
||||
* @param User $user User who performed the deletion
|
||||
* @param string $reason Reason
|
||||
* @param string $reason
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onFileDeleteComplete( $file, $oldimage, $article, $user,
|
||||
|
|
|
|||
|
|
@ -1114,8 +1114,6 @@ class OutputPage extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the subtitle
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSubtitle() {
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ interface ResponseInterface {
|
|||
*
|
||||
* The body MUST be a StreamInterface object.
|
||||
*
|
||||
* @param StreamInterface $body Body.
|
||||
* @param StreamInterface $body
|
||||
* @throws \InvalidArgumentException When the body is not valid.
|
||||
*/
|
||||
public function setBody( StreamInterface $body );
|
||||
|
|
|
|||
|
|
@ -485,8 +485,6 @@ class Revision implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the user ID/name
|
||||
*
|
||||
* This should only be used for proposed revisions that turn out to be null edits
|
||||
*
|
||||
* @note Only supported on Revisions that were constructed based on associative arrays,
|
||||
|
|
|
|||
|
|
@ -1152,8 +1152,6 @@ class WebRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set session data
|
||||
*
|
||||
* @note Prefer $this->getSession() instead if making multiple calls.
|
||||
* @param string $key Name of key in the session
|
||||
* @param mixed $data
|
||||
|
|
|
|||
|
|
@ -572,7 +572,6 @@ abstract class ApiBase extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the error formatter
|
||||
* @stable to override
|
||||
* @return ApiErrorFormatter
|
||||
*/
|
||||
|
|
@ -600,7 +599,6 @@ abstract class ApiBase extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the continuation manager
|
||||
* @return ApiContinuationManager|null
|
||||
*/
|
||||
public function getContinuationManager() {
|
||||
|
|
@ -614,7 +612,6 @@ abstract class ApiBase extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the continuation manager
|
||||
* @param ApiContinuationManager|null $manager
|
||||
*/
|
||||
public function setContinuationManager( ApiContinuationManager $manager = null ) {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ class ApiContinuationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the generator done?
|
||||
* @return bool
|
||||
*/
|
||||
public function isGeneratorDone() {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ class ApiHelpParamValueMessage extends Message {
|
|||
}
|
||||
|
||||
/**
|
||||
* Fetch the message.
|
||||
* @return string
|
||||
*/
|
||||
public function fetchMessage() {
|
||||
|
|
|
|||
|
|
@ -384,7 +384,6 @@ class ApiMain extends ApiBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the continuation manager
|
||||
* @return ApiContinuationManager|null
|
||||
*/
|
||||
public function getContinuationManager() {
|
||||
|
|
@ -392,7 +391,6 @@ class ApiMain extends ApiBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the continuation manager
|
||||
* @param ApiContinuationManager|null $manager
|
||||
*/
|
||||
public function setContinuationManager( ApiContinuationManager $manager = null ) {
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ abstract class ApiQueryBase extends ApiBase {
|
|||
* @since 1.33
|
||||
* @param string $table Table name
|
||||
* @param string $field Field name
|
||||
* @param int[] $ids IDs
|
||||
* @param int[] $ids
|
||||
* @return int Count of IDs actually included
|
||||
*/
|
||||
protected function addWhereIDsFld( $table, $field, $ids ) {
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
|
|||
* Extract information from the RevisionRecord
|
||||
*
|
||||
* @since 1.32, takes a RevisionRecord instead of a Revision
|
||||
* @param RevisionRecord $revision Revision
|
||||
* @param RevisionRecord $revision
|
||||
* @param object $row Should have a field 'ts_tags' if $this->fld_tags is set
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -154,7 +154,6 @@ class ApiResult implements ApiSerializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the error formatter
|
||||
* @since 1.25
|
||||
* @param ApiErrorFormatter $formatter
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface APIAfterExecuteHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onAPIAfterExecute( $module );
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface APIGetAllowedParamsHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @param array &$params Array of parameters
|
||||
* @param int $flags Zero or OR-ed flags like ApiBase::GET_VALUES_FOR_HELP
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface APIGetDescriptionMessagesHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @param Message[] &$msg Array of Message objects
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface APIGetParamDescriptionMessagesHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @param Message[][] &$msg Array of arrays of Message objects
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface APIHelpModifyOutputHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @param string[] &$help Array of HTML strings to be joined for the output
|
||||
* @param array $options Array of formatting options passed to ApiHelp::getHelp
|
||||
* @param array &$tocData If a TOC is being generated, this array has keys as anchors in
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface APIQueryAfterExecuteHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onAPIQueryAfterExecute( $module );
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ interface APIQueryGeneratorAfterExecuteHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @param ApiPageSet $resultPageSet
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ interface ApiCheckCanExecuteHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param ApiBase $module Module object
|
||||
* @param ApiBase $module
|
||||
* @param User $user Current user
|
||||
* @param IApiMessage|Message|string|array &$message API message to die with.
|
||||
* Specific values accepted depend on the MediaWiki version:
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ trait SearchApi {
|
|||
* - search engine profiles defined by SearchApi::getSearchProfileParams()
|
||||
* @param string[]|null $params API request params (must be sanitized by
|
||||
* ApiBase::extractRequestParams() before)
|
||||
* @return SearchEngine the search engine
|
||||
* @return SearchEngine
|
||||
*/
|
||||
public function buildSearchEngine( array $params = null ) {
|
||||
if ( $params != null ) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ abstract class AbstractPasswordPrimaryAuthenticationProvider
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the PasswordFactory
|
||||
* @return PasswordFactory
|
||||
*/
|
||||
protected function getPasswordFactory() {
|
||||
|
|
|
|||
|
|
@ -2371,7 +2371,6 @@ class AuthManager implements LoggerAwareInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the configuration
|
||||
* @return array
|
||||
*/
|
||||
private function getConfiguration() {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ interface AuthenticationProvider extends LoggerAwareInterface {
|
|||
public function setConfig( Config $config );
|
||||
|
||||
/**
|
||||
* Set the HookContainer
|
||||
* @param HookContainer $hookContainer
|
||||
*/
|
||||
public function setHookContainer( HookContainer $hookContainer );
|
||||
|
|
|
|||
|
|
@ -1089,8 +1089,6 @@ class DatabaseBlock extends AbstractBlock {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get Restrictions.
|
||||
*
|
||||
* Getting the restrictions will perform a database query if the restrictions
|
||||
* are not already loaded.
|
||||
*
|
||||
|
|
@ -1121,8 +1119,6 @@ class DatabaseBlock extends AbstractBlock {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set Restrictions.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction[] $restrictions
|
||||
* @return self
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ class PageRestriction extends AbstractRestriction {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the title.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param \Title $title
|
||||
* @return self
|
||||
|
|
@ -64,8 +62,6 @@ class PageRestriction extends AbstractRestriction {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get Title.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return \Title|null
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ interface HtmlCacheUpdaterAppendUrlsHook {
|
|||
* @since 1.35
|
||||
*
|
||||
* @param Title $title Title of the page being updated
|
||||
* @param int $mode Mode
|
||||
* @param int $mode
|
||||
* @param array &$append Append URLs relating to the title
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -94,8 +94,6 @@ class ContentModelChange {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the message prefix
|
||||
*
|
||||
* @param string $msgPrefix
|
||||
*/
|
||||
public function setMessagePrefix( $msgPrefix ) {
|
||||
|
|
@ -145,8 +143,6 @@ class ContentModelChange {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create the new content
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
private function createNewContent() {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class MessageContent extends AbstractContent {
|
|||
*
|
||||
* @deprecated since 1.33 use getMessage() instead.
|
||||
*
|
||||
* @return Message The message object.
|
||||
* @return Message
|
||||
*/
|
||||
public function getNativeData() {
|
||||
return $this->getMessage();
|
||||
|
|
@ -93,7 +93,7 @@ class MessageContent extends AbstractContent {
|
|||
*
|
||||
* @since 1.33
|
||||
*
|
||||
* @return Message The message object.
|
||||
* @return Message
|
||||
*/
|
||||
public function getMessage() {
|
||||
// NOTE: Message objects are mutable. Cloning here makes MessageContent immutable.
|
||||
|
|
|
|||
|
|
@ -216,7 +216,6 @@ class WikiTextStructure {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get opening text
|
||||
* @return string
|
||||
*/
|
||||
public function getOpeningText() {
|
||||
|
|
@ -225,7 +224,6 @@ class WikiTextStructure {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get main text
|
||||
* @return string
|
||||
*/
|
||||
public function getMainText() {
|
||||
|
|
@ -234,7 +232,6 @@ class WikiTextStructure {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get auxiliary text
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAuxiliaryText() {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ class WikitextContentHandler extends TextContentHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get file handler
|
||||
* @return FileContentHandler
|
||||
*/
|
||||
protected function getFileHandler() {
|
||||
|
|
|
|||
|
|
@ -71,9 +71,6 @@ class CloneDatabase {
|
|||
$this->useTemporaryTables = $u;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone the table structure
|
||||
*/
|
||||
public function cloneTableStructure() {
|
||||
global $wgSharedTables, $wgSharedDB;
|
||||
foreach ( $this->tablesToClone as $tbl ) {
|
||||
|
|
|
|||
|
|
@ -1979,9 +1979,6 @@ class DifferenceEngine extends ContextSource {
|
|||
return [ $oldid, $newid ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load revision IDs
|
||||
*/
|
||||
private function loadRevisionIds() {
|
||||
if ( $this->mRevisionsIdsLoaded ) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -82,8 +82,6 @@ class FileBackendGroup {
|
|||
}
|
||||
|
||||
/**
|
||||
* Destroy the singleton instance
|
||||
*
|
||||
* @deprecated since 1.35, test framework should reset services between tests instead
|
||||
*/
|
||||
public static function destroySingleton() {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
trait MediaFileTrait {
|
||||
/**
|
||||
* @param File $file the file object
|
||||
* @param File $file
|
||||
* @param User $user user object (for permissions check)
|
||||
* @param array $transforms array of transforms to include in the response
|
||||
* @return array response data
|
||||
|
|
|
|||
|
|
@ -195,7 +195,6 @@ abstract class ImageGalleryBase extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set bad image flag
|
||||
* @param bool $flag
|
||||
*/
|
||||
public function setHideBadImages( $flag = true ) {
|
||||
|
|
|
|||
|
|
@ -1634,7 +1634,6 @@ class HTMLForm extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the title
|
||||
* @return Title
|
||||
*/
|
||||
public function getTitle() {
|
||||
|
|
|
|||
|
|
@ -282,7 +282,6 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the user agent
|
||||
* @param string $UA
|
||||
*/
|
||||
public function setUserAgent( $UA ) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ interface ILanguageConverter {
|
|||
public function getPreferredVariant();
|
||||
|
||||
/**
|
||||
* Get default variant.
|
||||
* This function would not be affected by user's settings
|
||||
* @return string The default variant code
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -222,10 +222,10 @@ class LogPage {
|
|||
*
|
||||
* @param string $type Log type
|
||||
* @param string $action Log action
|
||||
* @param Title|null $title Title object or null
|
||||
* @param Title|null $title
|
||||
* @param Skin|null $skin Skin object or null. If null, we want to use the wiki
|
||||
* content language, since that will go to the IRC feed.
|
||||
* @param array $params Parameters
|
||||
* @param array $params
|
||||
* @param bool $filterWikilinks Whether to filter wiki links
|
||||
* @return string HTML
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -268,9 +268,6 @@ class Article implements Page {
|
|||
return $this->mPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the object
|
||||
*/
|
||||
public function clear() {
|
||||
$this->mContentLoaded = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -2020,7 +2020,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
* @deprecated since 1.32, use getDerivedDataUpdater instead.
|
||||
*
|
||||
* @param Content $content
|
||||
* @param Revision|RevisionRecord|null $revision Revision object.
|
||||
* @param Revision|RevisionRecord|null $revision
|
||||
* Used with vary-revision or vary-revision-id. Passing a Revision object
|
||||
* is hard deprecated since 1.35;
|
||||
* @param User|null $user
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface ParserBeforePreprocessHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param Parser $parser Parser object
|
||||
* @param Parser $parser
|
||||
* @param string &$text text to parse
|
||||
* @param StripState $stripState StripState instance being used
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -594,8 +594,6 @@ class PPFrame_Hash implements PPFrame {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the TTL
|
||||
*
|
||||
* @param int $ttl
|
||||
*/
|
||||
public function setTTL( $ttl ) {
|
||||
|
|
@ -605,8 +603,6 @@ class PPFrame_Hash implements PPFrame {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the TTL
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getTTL() {
|
||||
|
|
|
|||
|
|
@ -1283,8 +1283,6 @@ class Parser {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the StripState
|
||||
*
|
||||
* @return StripState
|
||||
*/
|
||||
public function getStripState() {
|
||||
|
|
@ -3987,8 +3985,6 @@ class Parser {
|
|||
}
|
||||
|
||||
/**
|
||||
* Increment the expensive function count
|
||||
*
|
||||
* @return bool False if the limit has been exceeded
|
||||
*/
|
||||
public function incrementExpensiveFunctionCount() {
|
||||
|
|
|
|||
|
|
@ -989,8 +989,6 @@ class ParserOptions {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the redirect target.
|
||||
*
|
||||
* Note that setting or changing this does not *make* the page a redirect
|
||||
* or change its target, it merely records the information for reference
|
||||
* during the parse.
|
||||
|
|
|
|||
|
|
@ -114,8 +114,6 @@ class VersionChecker {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set PHP version.
|
||||
*
|
||||
* @param string $phpVersion Current PHP version. Must be well-formed.
|
||||
* @throws UnexpectedValueException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -490,7 +490,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the skip function.
|
||||
* @return null|string
|
||||
* @throws RuntimeException If the file doesn't exist
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get index type
|
||||
* @return string
|
||||
*/
|
||||
public function getIndexType() {
|
||||
|
|
@ -117,7 +116,6 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get subfields
|
||||
* @return SearchIndexFieldDefinition[]
|
||||
*/
|
||||
public function getSubfields() {
|
||||
|
|
@ -125,7 +123,6 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set subfields
|
||||
* @param SearchIndexFieldDefinition[] $subfields
|
||||
* @return $this
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ class SearchSuggestion {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the suggested title
|
||||
* @param Title|null $title
|
||||
*/
|
||||
public function setSuggestedTitle( Title $title = null ) {
|
||||
|
|
@ -116,7 +115,6 @@ class SearchSuggestion {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the suggested title ID
|
||||
* @param int|null $suggestedTitleID
|
||||
*/
|
||||
public function setSuggestedTitleID( $suggestedTitleID = null ) {
|
||||
|
|
|
|||
|
|
@ -299,7 +299,6 @@ class CookieSessionProvider extends SessionProvider {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the "logged out" cookie
|
||||
* @param int $loggedOut timestamp
|
||||
* @param WebRequest $request
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -239,7 +239,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the "logged out" timestamp
|
||||
* @param int $ts
|
||||
*/
|
||||
public function setLoggedOutTimestamp( $ts ) {
|
||||
|
|
@ -271,8 +270,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess {
|
|||
}
|
||||
|
||||
/**
|
||||
* Renew the session
|
||||
*
|
||||
* Resets the TTL in the backend store if the session is near expiring, and
|
||||
* re-persists the session to any active WebRequests if persistent.
|
||||
*/
|
||||
|
|
@ -575,8 +572,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess {
|
|||
}
|
||||
|
||||
/**
|
||||
* Save the session
|
||||
*
|
||||
* This will update the backend data and might re-persist the session
|
||||
* if needed.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -504,7 +504,6 @@ final class SessionBackend {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the "logged out" timestamp
|
||||
* @param int|null $ts
|
||||
*/
|
||||
public function setLoggedOutTimestamp( $ts = null ) {
|
||||
|
|
@ -531,7 +530,6 @@ final class SessionBackend {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set provider metadata
|
||||
* @note For use by SessionProvider subclasses only
|
||||
* @param array|null $metadata
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ final class SessionId {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the ID
|
||||
* @return string
|
||||
*/
|
||||
public function getId() {
|
||||
|
|
@ -59,7 +58,6 @@ final class SessionId {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the ID
|
||||
* @internal For use by \MediaWiki\Session\SessionManager only
|
||||
* @param string $id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -105,8 +105,6 @@ final class SessionManager implements SessionManagerInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the "global" session
|
||||
*
|
||||
* If PHP's session_id() has been set, returns that session. Otherwise
|
||||
* returns the session for RequestContext::getMain()->getRequest().
|
||||
*
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ abstract class SessionProvider implements SessionProviderInterface, LoggerAwareI
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the hook container
|
||||
* @internal
|
||||
* @param HookContainer $hookContainer
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -360,7 +360,6 @@ abstract class Skin extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the "relevant" title
|
||||
* @see self::getRelevantTitle()
|
||||
* @param Title $t
|
||||
*/
|
||||
|
|
@ -383,7 +382,6 @@ abstract class Skin extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the "relevant" user
|
||||
* @see self::getRelevantUser()
|
||||
* @param User $u
|
||||
*/
|
||||
|
|
@ -1974,8 +1972,6 @@ abstract class Skin extends ContextSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the site notice
|
||||
*
|
||||
* @return string HTML fragment
|
||||
*/
|
||||
public function getSiteNotice() {
|
||||
|
|
@ -2011,7 +2007,7 @@ abstract class Skin extends ContextSource {
|
|||
* to be included in the link, like "§ion=$section"
|
||||
* @param string|null $tooltip The tooltip to use for the link: will be escaped
|
||||
* and wrapped in the 'editsectionhint' message
|
||||
* @param Language $lang Language object
|
||||
* @param Language $lang
|
||||
* @return string HTML to use for edit link
|
||||
*/
|
||||
public function doEditSectionLink( Title $nt, $section, $tooltip, Language $lang ) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ class SparqlClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set client options
|
||||
* @param array $options
|
||||
* @return $this
|
||||
*/
|
||||
|
|
@ -105,8 +104,6 @@ class SparqlClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set user agent string.
|
||||
*
|
||||
* Mote it is not recommended to completely override user agent for
|
||||
* most applications.
|
||||
* @see appendUserAgent() for recommended way of specifying user agent.
|
||||
|
|
|
|||
|
|
@ -1679,9 +1679,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
|
|||
$this->outputChangesList( $rows, $opts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Output feed links.
|
||||
*/
|
||||
public function outputFeedLinks() {
|
||||
// nothing by default
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ interface ChangeAuthenticationDataAuditHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param AuthenticationRequest $req AuthenticationRequest object
|
||||
* describing the change (and target user)
|
||||
* @param AuthenticationRequest $req Object describing the change (and target user)
|
||||
* @param StatusValue $status StatusValue with the result of the action
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface NewPagesLineEndingHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param SpecialNewPages $page The SpecialNewPages object
|
||||
* @param SpecialNewPages $page
|
||||
* @param string &$ret the HTML line
|
||||
* @param stdClass $row The database row for this page (the recentchanges record and a few extras
|
||||
* - see NewPagesPager::getQueryInfo)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ interface SpecialContributions__formatRow__flagsHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param IContextSource $context IContextSource object
|
||||
* @param IContextSource $context
|
||||
* @param stdClass $row Revision information from the database
|
||||
* @param string[] &$flags HTML fragments describing flags for this row
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ interface SpecialMovepageAfterMoveHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param MovePageForm $movePage MovePageForm object
|
||||
* @param Title $oldTitle Old title
|
||||
* @param Title $newTitle New title
|
||||
* @param MovePageForm $movePage
|
||||
* @param Title $oldTitle
|
||||
* @param Title $newTitle
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onSpecialMovepageAfterMove( $movePage, $oldTitle, $newTitle );
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ interface SpecialStatsAddExtraHook {
|
|||
* "number" is the number to be displayed.
|
||||
* or, <value> can be the number to be displayed and <name> is the
|
||||
* message key to use in the name column,
|
||||
* @param IContextSource $context IContextSource object
|
||||
* @param IContextSource $context
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onSpecialStatsAddExtra( &$extraStats, $context );
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ interface SpecialTrackingCategories__generateCatLinkHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param SpecialTrackingCategories $specialPage The SpecialTrackingCategories object
|
||||
* @param SpecialTrackingCategories $specialPage
|
||||
* @param Title $catTitle The Title object of the linked category
|
||||
* @param string &$html The Result html
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ interface SpecialTrackingCategories__preprocessHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param SpecialTrackingCategories $specialPage The SpecialTrackingCategories object
|
||||
* @param SpecialTrackingCategories $specialPage
|
||||
* @param array $trackingCategories Array of data from Special:TrackingCategories with msg and
|
||||
* cats
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface SpecialUploadCompleteHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param SpecialUpload $form The SpecialUpload object
|
||||
* @param SpecialUpload $form
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onSpecialUploadComplete( $form );
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ class SpecialPreferences extends SpecialPage {
|
|||
|
||||
/**
|
||||
* Get the preferences form to use.
|
||||
* @param User $user The user.
|
||||
* @param IContextSource $context The context.
|
||||
* @param User $user
|
||||
* @param IContextSource $context
|
||||
* @return PreferencesFormOOUI|HTMLForm
|
||||
*/
|
||||
protected function getFormObject( $user, IContextSource $context ) {
|
||||
|
|
|
|||
|
|
@ -463,9 +463,6 @@ class SpecialWatchlist extends ChangesListSpecialPage {
|
|||
return wfGetDB( DB_REPLICA, 'watchlist' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Output feed links.
|
||||
*/
|
||||
public function outputFeedLinks() {
|
||||
$user = $this->getUser();
|
||||
$wlToken = $user->getTokenFromOption( 'watchlisttoken' );
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ class BotPassword implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the app ID
|
||||
* @return string
|
||||
*/
|
||||
public function getAppId() {
|
||||
|
|
@ -211,7 +210,6 @@ class BotPassword implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the token
|
||||
* @return string
|
||||
*/
|
||||
public function getToken() {
|
||||
|
|
@ -219,7 +217,6 @@ class BotPassword implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the restrictions
|
||||
* @return MWRestrictions
|
||||
*/
|
||||
public function getRestrictions() {
|
||||
|
|
@ -227,7 +224,6 @@ class BotPassword implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the grants
|
||||
* @return string[]
|
||||
*/
|
||||
public function getGrants() {
|
||||
|
|
@ -244,7 +240,6 @@ class BotPassword implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the password
|
||||
* @return Password
|
||||
*/
|
||||
private function getPassword() {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserGetEmailAuthenticationTimestampHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User object
|
||||
* @param User $user
|
||||
* @param string &$timestamp Timestamp. Change this to override the local email
|
||||
* authentication timestamp.
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserGetEmailHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User object
|
||||
* @param User $user
|
||||
* @param string &$email Email, change this to override local email
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserIsBlockedGloballyHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User object
|
||||
* @param User $user
|
||||
* @param string $ip User's IP address
|
||||
* @param bool &$blocked Whether the user is blocked, to be modified by the hook
|
||||
* @param null &$block The Block object, to be modified by the hook
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserIsBotHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user The user
|
||||
* @param User $user
|
||||
* @param bool &$isBot Whether this is user a bot or not (boolean)
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserLoadOptionsHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User object
|
||||
* @param User $user
|
||||
* @param array &$options Options, can be modified.
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserSetEmailAuthenticationTimestampHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User object
|
||||
* @param User $user
|
||||
* @param ?string &$timestamp new timestamp, change this to override local email
|
||||
* authentication timestamp
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface UserSetEmailHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User object
|
||||
* @param User $user
|
||||
* @param string &$email new email, change this to override new email address
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -105,8 +105,6 @@ class AutoloadGenerator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set PSR4 namespaces
|
||||
*
|
||||
* Unlike self::setExcludePaths(), this will only skip outputting the
|
||||
* autoloader entry when the namespace matches the path.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -482,8 +482,6 @@ class Language {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the LocalisationCache instance
|
||||
*
|
||||
* @deprecated since 1.34, use MediaWikiServices
|
||||
* @return LocalisationCache
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -222,7 +222,6 @@ abstract class LanguageConverter implements ILanguageConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get default variant.
|
||||
* This function would not be affected by user's settings
|
||||
* @return string The default variant code
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -368,7 +368,6 @@ abstract class Maintenance {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the batch size.
|
||||
* @param int $s The number of operations to do in a batch
|
||||
*/
|
||||
protected function setBatchSize( $s = 0 ) {
|
||||
|
|
|
|||
|
|
@ -1492,9 +1492,6 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up all test DBs
|
||||
*/
|
||||
public function setupAllTestDBs() {
|
||||
global $wgDBprefix;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,6 @@ class StatusTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test 'ok' and 'errors' getters.
|
||||
*
|
||||
* @covers Status::__get
|
||||
*/
|
||||
public function testOkAndErrorsGetters() {
|
||||
|
|
@ -71,8 +69,6 @@ class StatusTest extends MediaWikiLangTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test 'ok' setter.
|
||||
*
|
||||
* @covers Status::__set
|
||||
*/
|
||||
public function testOkSetter() {
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ class TestUserRegistry {
|
|||
}
|
||||
|
||||
/**
|
||||
* Clear the registry.
|
||||
*
|
||||
* TestUsers created by this class will not be deleted, but any handles
|
||||
* to existing immutable TestUsers will be deleted, ensuring these users
|
||||
* are not reused. We don't reset the counter or random string by design.
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ class ApiChangeContentModelTest extends ApiTestCase {
|
|||
] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test title must exist
|
||||
*/
|
||||
public function testTitleMustExist() {
|
||||
$name = __METHOD__;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class ApiTestContext extends RequestContext {
|
|||
* Returns a DerivativeContext with the request variables in place
|
||||
*
|
||||
* @param WebRequest $request WebRequest request object including parameters and session
|
||||
* @param User|null $user User or null
|
||||
* @param User|null $user
|
||||
* @return DerivativeContext
|
||||
*/
|
||||
public function newTestContext( WebRequest $request, User $user = null ) {
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ class ApiParamValidatorTest extends ApiTestCase {
|
|||
/**
|
||||
* @dataProvider provideGetValue
|
||||
* @param string|null $data Request value
|
||||
* @param mixed $settings Settings
|
||||
* @param mixed $settings
|
||||
* @param mixed $expect Expected value, or an expected ApiUsageException
|
||||
*/
|
||||
public function testGetValue( ?string $data, $settings, $expect ) : void {
|
||||
|
|
@ -598,7 +598,7 @@ class ApiParamValidatorTest extends ApiTestCase {
|
|||
/**
|
||||
* @dataProvider provideValidateValue
|
||||
* @param mixed $value Value to validate
|
||||
* @param mixed $settings Settings
|
||||
* @param mixed $settings
|
||||
* @param mixed $value Value to validate
|
||||
* @param mixed $expect Expected value, or an expected ApiUsageException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ class SanitizerTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide HTML5 tags
|
||||
*/
|
||||
public static function provideHtml5Tags() {
|
||||
$ESCAPED = true; # We want tag to be escaped
|
||||
$VERBATIM = false; # We want to keep the tag
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ trait FactoryArgTestTrait {
|
|||
* $method is returned from getFactoryMethodName(), and $args is constructed by applying
|
||||
* getMockValueForParam() to the factory method's parameters.
|
||||
*
|
||||
* @param object $factory Factory object
|
||||
* @param object $factory
|
||||
* @return object Object created by factory
|
||||
*/
|
||||
protected function createInstanceFromFactory( $factory ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue