Fix various documentation related to scalar types
Found by phan strict checks Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
This commit is contained in:
parent
37d5919e60
commit
d30b3d8926
24 changed files with 32 additions and 32 deletions
|
|
@ -102,7 +102,7 @@ class FeedUtils {
|
|||
* @param Title $title
|
||||
* @param int $oldid Old revision's id
|
||||
* @param int $newid New revision's id
|
||||
* @param int $timestamp New revision's timestamp
|
||||
* @param string $timestamp New revision's timestamp
|
||||
* @param string $comment New revision's comment
|
||||
* @param string $actiontext Text of the action; in case of log event
|
||||
* @return string
|
||||
|
|
@ -123,7 +123,7 @@ class FeedUtils {
|
|||
* @param Title $title
|
||||
* @param int $oldid Old revision's id
|
||||
* @param int $newid New revision's id
|
||||
* @param int $timestamp New revision's timestamp
|
||||
* @param string $timestamp New revision's timestamp
|
||||
* @param string $formattedComment New revision's comment in HTML format
|
||||
* @param string $actiontext Text of the action; in case of log event
|
||||
* @return string
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ interface BeforePageRedirectHook {
|
|||
*
|
||||
* @param OutputPage $out
|
||||
* @param string &$redirect URL, modifiable
|
||||
* @param int &$code HTTP code (eg '301' or '302'), modifiable
|
||||
* @param string &$code HTTP code (eg '301' or '302'), modifiable
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onBeforePageRedirect( $out, &$redirect, &$code );
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ interface EditPageBeforeEditButtonsHook {
|
|||
*
|
||||
* @param EditPage $editpage Current EditPage object
|
||||
* @param array &$buttons Array of edit buttons, "Save", "Preview", "Live", and "Diff"
|
||||
* @param string &$tabindex HTML tabindex of the last edit check/button
|
||||
* @param int &$tabindex HTML tabindex of the last edit check/button
|
||||
* @return bool|void True or no return value to continue or false to abort
|
||||
*/
|
||||
public function onEditPageBeforeEditButtons( $editpage, &$buttons, &$tabindex );
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class RSSFeed extends ChannelFeed {
|
|||
/**
|
||||
* Format a date given a timestamp. If a timestamp is not given, nothing is returned
|
||||
*
|
||||
* @param int|null $ts Timestamp
|
||||
* @param string|int|null $ts Timestamp
|
||||
* @return string|null Date string
|
||||
*/
|
||||
private function formatTime( $ts ) {
|
||||
|
|
|
|||
|
|
@ -1347,7 +1347,7 @@ abstract class ContentHandler {
|
|||
* @param SearchIndexField[] &$fields
|
||||
* @param SearchEngine $engine
|
||||
* @param string $name
|
||||
* @param int $type
|
||||
* @param string $type
|
||||
* @return SearchIndexField[] new field defs
|
||||
* @since 1.28
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1441,7 +1441,7 @@ class FileRepo {
|
|||
* Checks existence of an array of files.
|
||||
*
|
||||
* @param string[] $files Virtual URLs (or storage paths) of files to check
|
||||
* @return array<string,bool|null> Map of files and either bool indicating whether the files exist,
|
||||
* @return array<string|int,bool|null> Map of files and either bool indicating whether the files exist,
|
||||
* or null in case of I/O errors
|
||||
*/
|
||||
public function fileExistsBatch( array $files ) {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class FSFileBackend extends FileBackendStore {
|
|||
/** @var string Required OS username to own files */
|
||||
protected $fileOwner;
|
||||
|
||||
/** @var bool Simpler version of PHP_OS_FAMILY */
|
||||
/** @var string Simpler version of PHP_OS_FAMILY */
|
||||
protected $os;
|
||||
/** @var string OS username running this script */
|
||||
protected $currentUser;
|
||||
|
|
|
|||
|
|
@ -1671,7 +1671,7 @@ abstract class FileBackend implements LoggerAwareInterface {
|
|||
* - StatusValue::newGood() if this method is called without parameters
|
||||
* - StatusValue::newFatal() with all parameters to this method if passed in
|
||||
*
|
||||
* @param string ...$args
|
||||
* @param mixed ...$args
|
||||
* @return StatusValue
|
||||
*/
|
||||
final protected function newStatus( ...$args ) {
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ class LoadBalancer implements ILoadBalancer {
|
|||
/**
|
||||
* @param array $loads
|
||||
* @param string $domain Resolved DB domain
|
||||
* @param int $maxLag Restrict the maximum allowed lag to this many seconds
|
||||
* @param int|float $maxLag Restrict the maximum allowed lag to this many seconds, or INF for no max
|
||||
* @return bool|int|string
|
||||
*/
|
||||
private function getRandomNonLagged( array $loads, string $domain, $maxLag = INF ) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class JpegHandler extends ExifBitmapHandler {
|
|||
}
|
||||
|
||||
/** Validate and normalize quality value to be between 1 and 100 (inclusive).
|
||||
* @param int $value Quality value, will be converted to integer or 0 if invalid
|
||||
* @param string $value Quality value, will be converted to integer or 0 if invalid
|
||||
* @return bool True if the value is valid
|
||||
*/
|
||||
private static function validateQuality( $value ) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ abstract class MediaTransformOutput {
|
|||
/** @var bool|string */
|
||||
protected $page;
|
||||
|
||||
/** @var bool|string Filesystem path to the thumb */
|
||||
/** @var string|null|false Filesystem path to the thumb */
|
||||
protected $path;
|
||||
|
||||
/** @var bool|string Language code, false if not set */
|
||||
|
|
|
|||
|
|
@ -306,8 +306,8 @@ class SvgHandler extends ImageHandler {
|
|||
* This function can be called outside of thumbnail contexts
|
||||
* @param string $srcPath
|
||||
* @param string $dstPath
|
||||
* @param string $width
|
||||
* @param string $height
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
* @param string|false $lang Language code of the language to render the SVG in
|
||||
* @throws MWException
|
||||
* @return bool|MediaTransformError
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class ThumbnailImage extends MediaTransformOutput {
|
|||
*
|
||||
* @param File $file
|
||||
* @param string $url URL path to the thumb
|
||||
* @param string|bool $path Filesystem path to the thumb
|
||||
* @param string|null|false $path Filesystem path to the thumb
|
||||
* @param array $parameters Associative array of parameters
|
||||
*/
|
||||
public function __construct( $file, $url, $path = false, $parameters = [] ) {
|
||||
|
|
|
|||
|
|
@ -2209,7 +2209,7 @@ class WikiPage implements Page, IDBAccessObject, PageRecord {
|
|||
*
|
||||
* @param array $limit Set of restriction keys
|
||||
* @param array $expiry Per restriction type expiration
|
||||
* @param int &$cascade Set to false if cascading protection isn't allowed.
|
||||
* @param bool &$cascade Set to false if cascading protection isn't allowed.
|
||||
* @param string $reason
|
||||
* @param UserIdentity $user The user updating the restrictions
|
||||
* @param string|string[]|null $tags Change tags to add to the pages and protection log entries
|
||||
|
|
|
|||
|
|
@ -5654,7 +5654,7 @@ class Parser {
|
|||
* returned.
|
||||
*
|
||||
* @param string $mode One of "get" or "replace"
|
||||
* @param string $newText Replacement text for section data.
|
||||
* @param string|false $newText Replacement text for section data.
|
||||
* @return string For "get", the extracted section text.
|
||||
* for "replace", the whole page with the section replaced.
|
||||
*/
|
||||
|
|
@ -5782,7 +5782,7 @@ class Parser {
|
|||
* @param string $text Text to look in
|
||||
* @param string|int $sectionId Section identifier as a number or string
|
||||
* (e.g. 0, 1 or 'T-1').
|
||||
* @param string $defaultText Default to return if section is not found
|
||||
* @param string|false $defaultText Default to return if section is not found
|
||||
*
|
||||
* @return string Text of the requested section
|
||||
* @since 1.7
|
||||
|
|
@ -5799,7 +5799,7 @@ class Parser {
|
|||
* @param string $oldText Former text of the article
|
||||
* @param string|int $sectionId Section identifier as a number or string
|
||||
* (e.g. 0, 1 or 'T-1').
|
||||
* @param string $newText Replacing text
|
||||
* @param string|false $newText Replacing text
|
||||
*
|
||||
* @return string Modified text
|
||||
* @since 1.7
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ abstract class PoolCounter {
|
|||
*/
|
||||
private $isMightWaitKey;
|
||||
/**
|
||||
* @var bool Whether this process holds a "might wait" lock key
|
||||
* @var int Whether this process holds a "might wait" lock key
|
||||
*/
|
||||
private static $acquiredMightWaitKey = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class SessionManager implements SessionManagerInterface {
|
|||
/** @var SessionId[] */
|
||||
private $allSessionIds = [];
|
||||
|
||||
/** @var string[] */
|
||||
/** @var true[] */
|
||||
private $preventUsers = [];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class UserRightsProxy implements UserIdentity {
|
|||
/**
|
||||
* @param string $dbDomain
|
||||
* @param string $field
|
||||
* @param string $value
|
||||
* @param string|int $value
|
||||
* @param bool $ignoreInvalidDB
|
||||
* @return null|UserRightsProxy
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class WatchedItem {
|
|||
private $user;
|
||||
|
||||
/**
|
||||
* @var null|string the value of the wl_notificationtimestamp field
|
||||
* @var bool|null|string the value of the wl_notificationtimestamp field
|
||||
*/
|
||||
private $notificationTimestamp;
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class WatchedItem {
|
|||
/**
|
||||
* @param UserIdentity $user
|
||||
* @param LinkTarget|PageIdentity $target deprecated passing LinkTarget since 1.36
|
||||
* @param null|string $notificationTimestamp the value of the wl_notificationtimestamp field
|
||||
* @param bool|null|string $notificationTimestamp the value of the wl_notificationtimestamp field
|
||||
* @param null|string $expiry Optional expiry timestamp in any format acceptable to wfTimestamp()
|
||||
*/
|
||||
public function __construct(
|
||||
|
|
|
|||
|
|
@ -1548,8 +1548,8 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
|
|||
/**
|
||||
* @param UserIdentity $user
|
||||
* @param LinkTarget|PageIdentity $title deprecated passing LinkTarget since 1.36
|
||||
* @param WatchedItem $item
|
||||
* @param bool $force
|
||||
* @param WatchedItem|null $item
|
||||
* @param string $force
|
||||
* @param int|bool $oldid The ID of the last revision that the user viewed
|
||||
* @return bool|string|null
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class XmlSelect {
|
|||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param string|int $value
|
||||
*/
|
||||
public function setAttribute( $name, $value ) {
|
||||
$this->attributes[$name] = $value;
|
||||
|
|
@ -67,7 +67,7 @@ class XmlSelect {
|
|||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return string|null
|
||||
* @return string|int|null
|
||||
*/
|
||||
public function getAttribute( $name ) {
|
||||
return $this->attributes[$name] ?? null;
|
||||
|
|
@ -75,7 +75,7 @@ class XmlSelect {
|
|||
|
||||
/**
|
||||
* @param string $label
|
||||
* @param string|false $value If not given, assumed equal to $label
|
||||
* @param string|int|false $value If not given, assumed equal to $label
|
||||
*/
|
||||
public function addOption( $label, $value = false ) {
|
||||
$value = $value !== false ? $value : $label;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class Sqlite {
|
|||
* Will throw exceptions on SQL errors
|
||||
* @param array|string $files
|
||||
* @throws MWException
|
||||
* @return bool True if no error or error string in case of errors
|
||||
* @return true|string True if no error or error string in case of errors
|
||||
*/
|
||||
public static function checkSqlSyntax( $files ) {
|
||||
if ( !self::isPresent() ) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ SPARQLD;
|
|||
/**
|
||||
* List of processed page IDs,
|
||||
* so we don't try to process same thing twice
|
||||
* @var int[]
|
||||
* @var true[]
|
||||
*/
|
||||
protected $processed = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class ImageBuilder extends Maintenance {
|
|||
/** @var int */
|
||||
private $count;
|
||||
|
||||
/** @var int */
|
||||
/** @var float */
|
||||
private $startTime;
|
||||
|
||||
/** @var string */
|
||||
|
|
|
|||
Loading…
Reference in a new issue