/**
* 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
*/
}
/**
- * @return string timestamp
+ * @return string Timestamp
*/
function getTimestamp() {
if ( $this->mRevision ) {
$group = new self();
/**
- * @var \Site $site
+ * @var Site $site
*/
foreach ( $this as $site ) {
if ( $site->getGroup() === $groupName ) {
* @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(
// @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() {
* - `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 ) {
/**
* 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 );
/**
* 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();
* @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;
/**
* 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 )
/**
* 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;
}
/**
- * @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;
* 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 ) {
* 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 ) {
/**
* 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 ) {
/** @var bool Whether or not to remove <nowiki> 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() {
/**
* 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)
* @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(
/**
* 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 );
/**
*
- * @param array $dupes of File objects
+ * @param array $dupes Array of File objects
*/
function showList( $dupes ) {
$html = array();
* 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 ) {
/**
* 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 ) {
* 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 ) {
* 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 ) {
* 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
/**
* 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().
*/
* 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 ) {
*/
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;
* 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 ) {
*
* @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 );
/**
* 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 ) ) {
/**
* 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 );
* 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;
/**
* 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;
* 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
* @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
* @param SearchResult $result
* @param string $lastInterwiki
* @param string $query
- * @param array $customCaptions iw prefix -> caption
+ * @param array $customCaptions Interwiki prefix -> caption
*
* @return string
*/
/**
* Empty function; submission is handled elsewhere.
*
- * @return bool false
+ * @return bool False
*/
function trySubmit() {
return false;
/**
* 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
*/
* 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
*/
* @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
/**
* 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
/**
* Returns $this->getUser()->changeableGroups()
*
- * @return array array(
+ * @return array Array(
* 'add' => array( addablegroups ),
* 'remove' => array( removablegroups ),
* 'add-self' => array( addablegroups to self ),
}
/**
- * @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;
/**
* @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() {
* 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 ) {
* 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.
*/
* 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
*/
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,
* @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 ) {
* 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 = '' ) {
* @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
*/
*
* @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
*/
/**
* 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
*/
/**
* 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
*/
*
* @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
/**
* 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__ );
* 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.
*/
/**
* 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 ) {
* 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:
/**
* 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 ) {
/**
* 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 ) {
/**
* 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 ) {
/**
* 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
*/
* @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.
*/