From: umherirrender Date: Thu, 24 Jul 2014 17:43:44 +0000 (+0200) Subject: Cleanup some docs (includes/[s-z]) X-Git-Tag: 1.31.0-rc.0~14754^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=768ac15c700be7f25c4288f2675d2689f29859a3;p=lhc%2Fweb%2Fwiklou.git Cleanup some docs (includes/[s-z]) - Swap "$variable type" to "type $variable" - Added missing types - Fixed spacing inside docs - Makes beginning of @param/@return/@var/@throws in capital - Changed some types to match the more common spelling Change-Id: Ie419638e909a47aa72a274043604247830ee1a81 --- diff --git a/includes/search/SearchHighlighter.php b/includes/search/SearchHighlighter.php index 792369932a..57cdaf4723 100644 --- a/includes/search/SearchHighlighter.php +++ b/includes/search/SearchHighlighter.php @@ -295,7 +295,7 @@ class SearchHighlighter { /** * Split text into lines and add it to extracts array * - * @param array $extracts index -> $line + * @param array $extracts Index -> $line * @param int $count * @param string $text */ diff --git a/includes/search/SearchResult.php b/includes/search/SearchResult.php index 56ae2ffca2..453211be96 100644 --- a/includes/search/SearchResult.php +++ b/includes/search/SearchResult.php @@ -217,7 +217,7 @@ class SearchResult { } /** - * @return string timestamp + * @return string Timestamp */ function getTimestamp() { if ( $this->mRevision ) { diff --git a/includes/site/SiteList.php b/includes/site/SiteList.php index ecc38e2a4f..2d9f22dd6e 100644 --- a/includes/site/SiteList.php +++ b/includes/site/SiteList.php @@ -277,7 +277,7 @@ class SiteList extends GenericArrayObject { $group = new self(); /** - * @var \Site $site + * @var Site $site */ foreach ( $this as $site ) { if ( $site->getGroup() === $groupName ) { diff --git a/includes/specialpage/SpecialPage.php b/includes/specialpage/SpecialPage.php index f968276228..0070c74b04 100644 --- a/includes/specialpage/SpecialPage.php +++ b/includes/specialpage/SpecialPage.php @@ -101,8 +101,8 @@ class SpecialPage { * @param string $name Name of the special page, as seen in links and URLs * @param string $restriction User right required, e.g. "block" or "delete" * @param bool $listed Whether the page is listed in Special:Specialpages - * @param callable|bool $function unused - * @param string $file unused + * @param callable|bool $function Unused + * @param string $file Unused * @param bool $includable Whether the page can be included in normal pages */ public function __construct( @@ -134,7 +134,7 @@ class SpecialPage { // @todo FIXME: Decide which syntax to use for this, and stick to it /** * Whether this special page is listed in Special:SpecialPages - * @since r3583 (v1.3) + * @since 1.3 (r3583) * @return bool */ function isListed() { @@ -328,7 +328,7 @@ class SpecialPage { * - `prefixSearchSubpages( "" )` should return `array( foo", "bar", "baz" )` * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { diff --git a/includes/specials/SpecialAllPages.php b/includes/specials/SpecialAllPages.php index e4b606d3f4..04e2f11a49 100644 --- a/includes/specials/SpecialAllPages.php +++ b/includes/specials/SpecialAllPages.php @@ -45,7 +45,7 @@ class SpecialAllPages extends IncludableSpecialPage { /** * Constructor * - * @param string $name name of the special page, as seen in links and URLs (default: 'Allpages') + * @param string $name Name of the special page, as seen in links and URLs (default: 'Allpages') */ function __construct( $name = 'Allpages' ) { parent::__construct( $name ); @@ -54,7 +54,7 @@ class SpecialAllPages extends IncludableSpecialPage { /** * Entry point : initialise variables and call subfunctions. * - * @param string $par becomes "FOO" when called like Special:Allpages/FOO (default null) + * @param string $par Becomes "FOO" when called like Special:Allpages/FOO (default null) */ function execute( $par ) { $request = $this->getRequest(); diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 8c46a93b45..f8b2e8d969 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -28,7 +28,7 @@ * @ingroup SpecialPage */ class SpecialBlock extends FormSpecialPage { - /** @var User user to be blocked, as passed either by parameter (url?wpTarget=Foo) + /** @var User User to be blocked, as passed either by parameter (url?wpTarget=Foo) * or as subpage (Special:Block/Foo) */ protected $target; @@ -454,7 +454,7 @@ class SpecialBlock extends FormSpecialPage { /** * Determine the target of the block, and the type of target * @todo Should be in Block.php? - * @param string $par subpage parameter passed to setup, or data value from + * @param string $par Subpage parameter passed to setup, or data value from * the HTMLForm * @param WebRequest $request Optionally try and get data from a request too * @return array( User|string|null, Block::TYPE_ constant|null ) diff --git a/includes/specials/SpecialChangePassword.php b/includes/specials/SpecialChangePassword.php index ba5c7ec3e3..ad1d597113 100644 --- a/includes/specials/SpecialChangePassword.php +++ b/includes/specials/SpecialChangePassword.php @@ -61,7 +61,7 @@ class SpecialChangePassword extends FormSpecialPage { /** * Set a message at the top of the Change Password form * @since 1.23 - * @param Message $msg to parse and add to the form header + * @param Message $msg Message to parse and add to the form header */ public function setChangeMessage( Message $msg ) { $this->mPreTextMessage = $msg; @@ -230,7 +230,7 @@ class SpecialChangePassword extends FormSpecialPage { } /** - * @throws PasswordError when cannot set the new password because requirements not met. + * @throws PasswordError When cannot set the new password because requirements not met. */ protected function attemptReset( $oldpass, $newpass, $retype ) { global $wgPasswordAttemptThrottle; diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index 355726ad58..0896929a66 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -121,7 +121,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { @@ -763,8 +763,8 @@ class EditWatchlistCheckboxSeriesField extends HTMLMultiSelectField { * form is open (bug 32126), but we know that invalid items will * be harmless so we can override it here. * - * @param string $value the value the field was submitted with - * @param array $alldata the data collected from the form + * @param string $value The value the field was submitted with + * @param array $alldata The data collected from the form * @return bool|string Bool true on success, or String error to display. */ function validate( $value, $alldata ) { diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index 0062211611..0958126b20 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -175,7 +175,7 @@ class SpecialEmailUser extends UnlistedSpecialPage { /** * Validate target User * - * @param string $target target user name + * @param string $target Target user name * @return User User object on success or a string on error */ public static function getTarget( $target ) { diff --git a/includes/specials/SpecialExpandTemplates.php b/includes/specials/SpecialExpandTemplates.php index 35a3ba113d..ecbd353dbb 100644 --- a/includes/specials/SpecialExpandTemplates.php +++ b/includes/specials/SpecialExpandTemplates.php @@ -41,7 +41,7 @@ class SpecialExpandTemplates extends SpecialPage { /** @var bool Whether or not to remove tags in the expanded wikitext */ protected $removeNowiki; - /** @var maximum size in bytes to include. 50MB allows fixing those huge pages */ + /** @var int Maximum size in bytes to include. 50MB allows fixing those huge pages */ const MAX_INCLUDE_SIZE = 50000000; function __construct() { diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index bc8e728ecd..2cf5bfe73e 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -302,7 +302,7 @@ class SpecialExport extends SpecialPage { /** * Do the actual page exporting * - * @param string $page user input on what page(s) to export + * @param string $page User input on what page(s) to export * @param int $history One of the WikiExporter history export constants * @param bool $list_authors Whether to add distinct author list (when * not returning full history) @@ -536,7 +536,7 @@ class SpecialExport extends SpecialPage { * @param array $inputPages List of titles to look up * @param array $pageSet Associative array indexed by titles for output * - * @return array associative array index by titles + * @return array Associative array index by titles */ private function getImages( $inputPages, $pageSet ) { return $this->getLinks( diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index b6c9d55d0e..354960bb02 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -59,7 +59,7 @@ class FileDuplicateSearchPage extends QueryPage { /** * Fetch dupes from all connected file repositories. * - * @return array of File objects + * @return array Array of File objects */ function getDupes() { return RepoGroup::singleton()->findBySha1( $this->hash ); @@ -67,7 +67,7 @@ class FileDuplicateSearchPage extends QueryPage { /** * - * @param array $dupes of File objects + * @param array $dupes Array of File objects */ function showList( $dupes ) { $html = array(); diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index 03b368887f..a67d3c0b46 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -177,7 +177,7 @@ HTML; * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index a77b70cf2e..582f743841 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -217,12 +217,12 @@ class SpecialListGroupRights extends SpecialPage { /** * Create a user-readable list of permissions from the given array. * - * @param array $permissions of permission => bool (from $wgGroupPermissions items) - * @param array $revoke of permission => bool (from $wgRevokePermissions items) - * @param array $add of groups this group is allowed to add or true - * @param array $remove of groups this group is allowed to remove or true - * @param array $addSelf of groups this group is allowed to add to self or true - * @param array $removeSelf of group this group is allowed to remove from self or true + * @param array $permissions Array of permission => bool (from $wgGroupPermissions items) + * @param array $revoke Array of permission => bool (from $wgRevokePermissions items) + * @param array $add Array of groups this group is allowed to add or true + * @param array $remove Array of groups this group is allowed to remove or true + * @param array $addSelf Array of groups this group is allowed to add to self or true + * @param array $removeSelf Array of group this group is allowed to remove from self or true * @return string List of all granted permissions, separated by comma separator */ private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) { diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 53dddc70a2..feeafbc01f 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -403,7 +403,7 @@ class SpecialListUsers extends IncludableSpecialPage { * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index ced5d25453..36abeb00d4 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -119,7 +119,7 @@ class SpecialLog extends SpecialPage { * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index a6c40d7a3d..e1700dee64 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -335,7 +335,7 @@ class SpecialMergeHistory extends SpecialPage { * The user may have to "undo" the redirect manually to finish the "unmerge". * Maybe this should delete redirects at the target page of merges? * - * @return boolean Success + * @return bool Success */ function merge() { # Get the titles directly from the IDs, in case the target page params diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 7223efd69b..ee144d6dc9 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -126,7 +126,7 @@ class MovePageForm extends UnlistedSpecialPage { /** * Show the form * - * @param array $err error messages. Each item is an error message. + * @param array $err Error messages. Each item is an error message. * It may either be a string message name or array message name and * parameters, like the second argument to OutputPage::wrapWikiMsg(). */ diff --git a/includes/specials/SpecialMyLanguage.php b/includes/specials/SpecialMyLanguage.php index 01bf0ecaa1..cef041196c 100644 --- a/includes/specials/SpecialMyLanguage.php +++ b/includes/specials/SpecialMyLanguage.php @@ -59,7 +59,7 @@ class SpecialMyLanguage extends RedirectSpecialArticle { * it returns Page/fi if it exists, otherwise Page/de if it exists, * otherwise Page. * - * @param $par + * @param string $par * @return Title|null */ public function findTitle( $par ) { diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index 24eca079a7..75880d1c71 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -30,7 +30,7 @@ */ class SpecialPageLanguage extends FormSpecialPage { /** - * @var $goToUrl URL to go to if language change successful + * @var string URL to go to if language change successful */ private $goToUrl; diff --git a/includes/specials/SpecialPagesWithProp.php b/includes/specials/SpecialPagesWithProp.php index 05f0b2b1f4..f5b19cc6c6 100644 --- a/includes/specials/SpecialPagesWithProp.php +++ b/includes/specials/SpecialPagesWithProp.php @@ -82,7 +82,7 @@ class SpecialPagesWithProp extends QueryPage { * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index 2707916203..8c01ef2b62 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -239,7 +239,7 @@ class SpecialRandomInCategory extends SpecialPage { * * @param Title $category * @return array The lowest and highest timestamp - * @throws MWException if category has no entries. + * @throws MWException If category has no entries. */ protected function getMinAndMaxForCat( Title $category ) { $dbr = wfGetDB( DB_SLAVE ); diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index 4926d6dd18..774fd80ca2 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -66,7 +66,7 @@ class SpecialRedirect extends FormSpecialPage { /** * Handle Special:Redirect/user/xxxx (by redirecting to User:YYYY) * - * @return string|null url to redirect to, or null if $mValue is invalid. + * @return string|null Url to redirect to, or null if $mValue is invalid. */ function dispatchUser() { if ( !ctype_digit( $this->mValue ) ) { @@ -85,7 +85,7 @@ class SpecialRedirect extends FormSpecialPage { /** * Handle Special:Redirect/file/xxxx * - * @return string|null url to redirect to, or null if $mValue is not found. + * @return string|null Url to redirect to, or null if $mValue is not found. */ function dispatchFile() { $title = Title::makeTitleSafe( NS_FILE, $this->mValue ); @@ -121,7 +121,7 @@ class SpecialRedirect extends FormSpecialPage { * Handle Special:Redirect/revision/xxx * (by redirecting to index.php?oldid=xxx) * - * @return string|null url to redirect to, or null if $mValue is invalid. + * @return string|null Url to redirect to, or null if $mValue is invalid. */ function dispatchRevision() { $oldid = $this->mValue; @@ -141,7 +141,7 @@ class SpecialRedirect extends FormSpecialPage { /** * Handle Special:Redirect/page/xxx (by redirecting to index.php?curid=xxx) * - * @return string|null url to redirect to, or null if $mValue is invalid. + * @return string|null Url to redirect to, or null if $mValue is invalid. */ function dispatchPage() { $curid = $this->mValue; @@ -164,7 +164,7 @@ class SpecialRedirect extends FormSpecialPage { * or do nothing (if $mValue wasn't set) allowing the form to be * displayed. * - * @return bool true if a redirect was successfully handled. + * @return bool True if a redirect was successfully handled. */ function dispatch() { // the various namespaces supported by Special:Redirect diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 15a7b59343..541faa14a4 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -406,7 +406,7 @@ class SpecialSearch extends SpecialPage { * @param Title $title * @param int $num The number of search results found * @param null|SearchResultSet $titleMatches Results from title search - * @param null|SearchResultSet $textMatches Results from text search + * @param null|SearchResultSet $textMatches Results from text search */ protected function showCreateLink( $title, $num, $titleMatches, $textMatches ) { // show direct page/create link if applicable @@ -798,7 +798,7 @@ class SpecialSearch extends SpecialPage { * @param SearchResult $result * @param string $lastInterwiki * @param string $query - * @param array $customCaptions iw prefix -> caption + * @param array $customCaptions Interwiki prefix -> caption * * @return string */ diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index fc18706566..4fd7cd4380 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -1144,7 +1144,7 @@ class UploadForm extends HTMLForm { /** * Empty function; submission is handled elsewhere. * - * @return bool false + * @return bool False */ function trySubmit() { return false; diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index 75ab19f12e..cb821cb3c4 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -57,7 +57,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { /** * Execute page -- can output a file directly or show a listing of them. * - * @param string $subPage subpage, e.g. in + * @param string $subPage Subpage, e.g. in * http://example.com/wiki/Special:UploadStash/foo.jpg, the "foo.jpg" part * @return bool Success */ @@ -75,7 +75,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * If file available in stash, cats it out to the client as a simple HTTP response. * n.b. Most sanity checking done in UploadStashLocalFile, so this is straightforward. * - * @param string $key the key of a particular requested file + * @param string $key The key of a particular requested file * @throws HttpError * @return bool */ @@ -227,7 +227,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * @param array $params Scaling parameters ( e.g. array( width => '50' ) ); * @param int $flags Scaling flags ( see File:: constants ) * @throws MWException - * @return bool success + * @return bool Success */ private function outputRemoteScaledThumb( $file, $params, $flags ) { // This global probably looks something like diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 1ef96c3680..0b119689b5 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1048,7 +1048,7 @@ class LoginForm extends SpecialPage { /** * Display a "successful action" page. * - * @param string $type condition of return to; see `executeReturnTo` + * @param string $type Condition of return to; see `executeReturnTo` * @param string|Message $title Page's title * @param string $msgname * @param string $injected_html diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 411970e780..0ec85ba166 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -715,7 +715,7 @@ class UserrightsPage extends SpecialPage { /** * Returns $this->getUser()->changeableGroups() * - * @return array array( + * @return array Array( * 'add' => array( addablegroups ), * 'remove' => array( removablegroups ), * 'add-self' => array( addablegroups to self ), diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 28ad0f4f88..8ca9e231a8 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -307,7 +307,7 @@ class SpecialVersion extends SpecialPage { } /** - * @return string wgVersion + a link to subversion revision of svn BASE + * @return string Global wgVersion + a link to subversion revision of svn BASE */ private static function getVersionLinkedSvn() { global $IP; @@ -349,7 +349,7 @@ class SpecialVersion extends SpecialPage { /** * @since 1.22 Returns the HEAD date in addition to the sha1 and link - * @return bool|string wgVersion + HEAD sha1 stripped to the first 7 chars + * @return bool|string Global wgVersion + HEAD sha1 stripped to the first 7 chars * with link and date, or false on failure */ private static function getVersionLinkedGit() { diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 94de5ce376..e33829591a 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -83,7 +83,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { * Return an array of subpages beginning with $search that this special page will accept. * * @param string $search Prefix to search for - * @param integer $limit Maximum number of results to return + * @param int $limit Maximum number of results to return * @return string[] Matching subpages */ public function prefixSearchSubpages( $search, $limit = 10 ) { diff --git a/includes/title/MediaWikiPageLinkRenderer.php b/includes/title/MediaWikiPageLinkRenderer.php index c593dca30b..f46cb5e3bf 100644 --- a/includes/title/MediaWikiPageLinkRenderer.php +++ b/includes/title/MediaWikiPageLinkRenderer.php @@ -45,7 +45,7 @@ class MediaWikiPageLinkRenderer implements PageLinkRenderer { * HtmlPageLinkRenderer, we will be using them, so it seems prudent to * already declare the dependency and inject them. * - * @param TitleFormatter $formatter formatter for generating the target title string + * @param TitleFormatter $formatter Formatter for generating the target title string * @param string $baseUrl (currently unused, pending refactoring of Linker). * Defaults to $wgArticlePath. */ @@ -62,7 +62,7 @@ class MediaWikiPageLinkRenderer implements PageLinkRenderer { * Returns the (partial) URL for the given page (including any section identifier). * * @param TitleValue $page The link's target - * @param array $params any additional URL parameters. + * @param array $params Any additional URL parameters. * * @return string */ diff --git a/includes/title/MediaWikiTitleCodec.php b/includes/title/MediaWikiTitleCodec.php index 3a9ab409a3..12b7143f33 100644 --- a/includes/title/MediaWikiTitleCodec.php +++ b/includes/title/MediaWikiTitleCodec.php @@ -49,8 +49,8 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { protected $localInterwikis; /** - * @param Language $language the language object to use for localizing namespace names. - * @param GenderCache $genderCache the gender cache for generating gendered namespace names + * @param Language $language The language object to use for localizing namespace names. + * @param GenderCache $genderCache The gender cache for generating gendered namespace names * @param string[]|string $localInterwikis */ public function __construct( Language $language, GenderCache $genderCache, @@ -67,7 +67,7 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { * @param int $namespace * @param string $text * - * @throws InvalidArgumentException if the namespace is invalid + * @throws InvalidArgumentException If the namespace is invalid * @return string */ public function getNamespaceName( $namespace, $text ) { @@ -97,7 +97,7 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { * Underscores will be replaced. * @param string $fragment The fragment name (may be empty). * - * @throws InvalidArgumentException if the namespace is invalid + * @throws InvalidArgumentException If the namespace is invalid * @return string */ public function formatTitle( $namespace, $text, $fragment = '' ) { diff --git a/includes/title/PageLinkRenderer.php b/includes/title/PageLinkRenderer.php index a277594239..fb1096e0fa 100644 --- a/includes/title/PageLinkRenderer.php +++ b/includes/title/PageLinkRenderer.php @@ -37,7 +37,7 @@ interface PageLinkRenderer { * @todo expand this to cover the functionality of Linker::linkUrl * * @param TitleValue $page The link's target - * @param array $params any additional URL parameters. + * @param array $params Any additional URL parameters. * * @return string */ diff --git a/includes/title/TitleFormatter.php b/includes/title/TitleFormatter.php index cb28028ab3..7c71ef5e63 100644 --- a/includes/title/TitleFormatter.php +++ b/includes/title/TitleFormatter.php @@ -50,7 +50,7 @@ interface TitleFormatter { * * @note Only minimal normalization is applied. Consider using TitleValue::getText() directly. * - * @param TitleValue $title the title to format + * @param TitleValue $title The title to format * * @return string */ @@ -59,7 +59,7 @@ interface TitleFormatter { /** * Returns the title formatted for display, including the namespace name. * - * @param TitleValue $title the title to format + * @param TitleValue $title The title to format * * @return string */ @@ -68,7 +68,7 @@ interface TitleFormatter { /** * Returns the title formatted for display, with namespace and fragment. * - * @param TitleValue $title the title to format + * @param TitleValue $title The title to format * * @return string */ diff --git a/includes/title/TitleParser.php b/includes/title/TitleParser.php index d5486639fc..0635ee86af 100644 --- a/includes/title/TitleParser.php +++ b/includes/title/TitleParser.php @@ -37,8 +37,8 @@ interface TitleParser { * * @note this only parses local page links, interwiki-prefixes etc. are not considered! * - * @param string $text the text to parse - * @param int $defaultNamespace namespace to assume per default (usually NS_MAIN) + * @param string $text The text to parse + * @param int $defaultNamespace Namespace to assume per default (usually NS_MAIN) * * @throws MalformedTitleException If the text is not a valid representation of a page title. * @return TitleValue diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 5defd45744..24a93e4f42 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -283,7 +283,7 @@ abstract class UploadBase { /** * Verify whether the upload is sane. - * @return mixed self::OK or else an array with error information + * @return mixed Const self::OK or else an array with error information */ public function verifyUpload() { wfProfileIn( __METHOD__ ); @@ -593,7 +593,7 @@ abstract class UploadBase { * isAllowed() should be called as well for generic is-user-blocked or * can-user-upload checking. * - * @param User $user object to verify the permissions against + * @param User $user User object to verify the permissions against * @return mixed An array as returned by getUserPermissionsErrors or true * in case the user has proper permissions. */ @@ -1276,8 +1276,8 @@ abstract class UploadBase { /** * Callback to filter SVG Processing Instructions. - * @param string $target processing instruction name - * @param string $data processing instruction attribute and value + * @param string $target Processing instruction name + * @param string $data Processing instruction attribute and value * @return bool (true if the filter identified something bad) */ public static function checkSvgPICallback( $target, $data ) { diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index 6f90280108..bea7128be5 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -68,7 +68,7 @@ class UploadFromChunks extends UploadFromFile { * Calls the parent stashFile and updates the uploadsession table to handle "chunks" * * @param User|null $user - * @return UploadStashFile stashed file + * @return UploadStashFile Stashed file */ public function stashFile( User $user = null ) { // Stash file is the called on creating a new chunk session: @@ -201,9 +201,9 @@ class UploadFromChunks extends UploadFromFile { /** * Add a chunk to the temporary directory * - * @param string $chunkPath path to temporary chunk file - * @param int $chunkSize size of the current chunk - * @param int $offset offset of current chunk ( mutch match database chunk offset ) + * @param string $chunkPath Path to temporary chunk file + * @param int $chunkSize Size of the current chunk + * @param int $offset Offset of current chunk ( mutch match database chunk offset ) * @return Status */ public function addChunk( $chunkPath, $chunkSize, $offset ) { diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index a7e7100248..23a7a3a8fe 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -167,7 +167,7 @@ class UploadStash { /** * Getter for file metadata. * - * @param string $key key under which file information is stored + * @param string $key Key under which file information is stored * @return array */ public function getMetadata( $key ) { @@ -179,7 +179,7 @@ class UploadStash { /** * Getter for fileProps * - * @param string $key key under which file information is stored + * @param string $key Key under which file information is stored * @return array */ public function getFileProps( $key ) { @@ -523,7 +523,7 @@ class UploadStash { /** * Helper function: Initialize the UploadStashFile for a given file. * - * @param string $key key under which to store the object + * @param string $key Key under which to store the object * @throws UploadStashZeroLengthFileException * @return bool */ diff --git a/includes/utils/ArrayUtils.php b/includes/utils/ArrayUtils.php index b6df18b682..1e521cb8b9 100644 --- a/includes/utils/ArrayUtils.php +++ b/includes/utils/ArrayUtils.php @@ -151,8 +151,7 @@ class ArrayUtils { * @since 1.23 * * @param array $array1 The array to compare from - * @param array $array2 An array to compare against - * @param array ... More arrays to compare against + * @param array $array2,... More arrays to compare against * @return array An array containing all the values from array1 * that are not present in any of the other arrays. */