Siebrand has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87556
Change subject: Update docs and declare visibility on class props
......................................................................
Update docs and declare visibility on class props
Change-Id: Ib0f02202d075d4a56dc4e37b08d7ac9399e8c86c
---
M includes/ArrayUtils.php
M includes/AuthPlugin.php
M includes/Exception.php
M includes/GlobalFunctions.php
M includes/Metadata.php
M includes/Status.php
M includes/cache/HTMLCacheUpdate.php
M includes/db/LoadMonitor.php
M includes/diff/DifferenceEngine.php
M includes/filerepo/FileRepoStatus.php
M includes/logging/LogPager.php
M includes/normal/UtfNormalTest.php
M includes/upload/UploadFromChunks.php
M includes/upload/UploadFromStash.php
14 files changed, 48 insertions(+), 36 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/56/87556/1
diff --git a/includes/ArrayUtils.php b/includes/ArrayUtils.php
index 985271f..0046753 100644
--- a/includes/ArrayUtils.php
+++ b/includes/ArrayUtils.php
@@ -14,9 +14,9 @@
* justification for breaking compatibility with installations
* compiled with ./configure --disable-hash.
*
- * @param $array The array to sort
- * @param $key The string key
- * @param $separator A separator used to delimit the array elements and
the
+ * @param $array array to sort
+ * @param $key string key
+ * @param $separator string A separator used to delimit the array
elements and the
* key. This can be chosen to provide backwards compatibility with
* various consistent hash implementations that existed before this
* function was introduced.
diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php
index 84cf3d5..ebd8af5 100644
--- a/includes/AuthPlugin.php
+++ b/includes/AuthPlugin.php
@@ -217,8 +217,8 @@
* Return true if successful.
*
* @param $user User object.
- * @param $addgroups Groups to add.
- * @param $delgroups Groups to remove.
+ * @param $addgroups array Groups to add.
+ * @param $delgroups array Groups to remove.
* @return Boolean
*/
public function updateExternalDBGroups( $user, $addgroups, $delgroups =
array() ) {
diff --git a/includes/Exception.php b/includes/Exception.php
index 39fe6f4..8859ee0 100644
--- a/includes/Exception.php
+++ b/includes/Exception.php
@@ -512,11 +512,11 @@
class UserNotLoggedIn extends ErrorPageError {
/**
- * @param $reasonMsg A message key containing the reason for the error.
+ * @param $reasonMsg string A message key containing the reason for the
error.
* Optional, default: 'exception-nologin-text'
- * @param $titleMsg A message key to set the page title.
+ * @param $titleMsg string A message key to set the page title.
* Optional, default: 'exception-nologin'
- * @param $params Parameters to wfMessage().
+ * @param $params array Parameters to wfMessage().
* Optional, default: null
*/
public function __construct(
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index b11bce9b..ef34688 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -81,7 +81,6 @@
function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
return Fallback::mb_strpos( $haystack, $needle, $offset,
$encoding );
}
-
}
if ( !function_exists( 'mb_strrpos' ) ) {
diff --git a/includes/Metadata.php b/includes/Metadata.php
index 37df489..a20821e 100644
--- a/includes/Metadata.php
+++ b/includes/Metadata.php
@@ -28,10 +28,10 @@
/**
* Constructor
- * @param $article Article object
+ * @param $page Page object
*/
- public function __construct( Page $article ) {
- $this->mArticle = $article;
+ public function __construct( Page $page ) {
+ $this->mArticle = $page;
}
abstract public function show();
diff --git a/includes/Status.php b/includes/Status.php
index 7ec1b0f..47fed33 100644
--- a/includes/Status.php
+++ b/includes/Status.php
@@ -33,16 +33,18 @@
* message and simultaneously switches off the OK flag.
*/
class Status {
- var $ok = true;
- var $value;
+ public $ok = true;
+ public $value;
/** Counters for batch operations */
- public $successCount = 0, $failCount = 0;
+ public $successCount = 0;
+ public $failCount = 0;
+
/** Array to indicate which items of the batch operations were
successful */
public $success = array();
- /*semi-private*/ var $errors = array();
- /*semi-private*/ var $cleanCallback = false;
+ /*semi-private*/ public $errors = array();
+ /*semi-private*/ public $cleanCallback = false;
/**
* Factory function for fatal errors
diff --git a/includes/cache/HTMLCacheUpdate.php
b/includes/cache/HTMLCacheUpdate.php
index 992809e..4147424 100644
--- a/includes/cache/HTMLCacheUpdate.php
+++ b/includes/cache/HTMLCacheUpdate.php
@@ -37,8 +37,6 @@
/**
* @param $titleTo
* @param $table
- * @param $start bool
- * @param $end bool
*/
function __construct( Title $titleTo, $table ) {
$this->mTitle = $titleTo;
diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php
index 519e2df..49ff69a 100644
--- a/includes/db/LoadMonitor.php
+++ b/includes/db/LoadMonitor.php
@@ -36,9 +36,9 @@
/**
* Perform pre-connection load ratio adjustment.
- * @param $loads array
- * @param string $group the selected query group
- * @param $wiki String
+ * @param array $loads
+ * @param string|bool $group the selected query group. Default: false
+ * @param string|bool $wiki Default: false
*/
function scaleLoads( &$loads, $group = false, $wiki = false );
diff --git a/includes/diff/DifferenceEngine.php
b/includes/diff/DifferenceEngine.php
index 0c9086b..9c053ca 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -80,7 +80,7 @@
* Constructor
* @param $context IContextSource context to use, anything else will be
ignored
* @param $old Integer old ID we want to show and diff with.
- * @param $new String either 'prev' or 'next'.
+ * @param $new String|int either 'prev' or 'next'. Default: 0.
* @param $rcid Integer Deprecated, no longer used!
* @param $refreshCache boolean If set, refreshes the diff cache
* @param $unhide boolean If set, allow viewing deleted revs
@@ -581,6 +581,9 @@
* Get the diff text, send it to the OutputPage object
* Returns false if the diff could not be generated, otherwise returns
true
*
+ * @param string|bool $otitle Header for old text or false
+ * @param string|bool $ntitle Header for new text or false
+ * @param string $notice
* @return bool
*/
function showDiff( $otitle, $ntitle, $notice = '' ) {
diff --git a/includes/filerepo/FileRepoStatus.php
b/includes/filerepo/FileRepoStatus.php
index 6f28b10..70b7ac6 100644
--- a/includes/filerepo/FileRepoStatus.php
+++ b/includes/filerepo/FileRepoStatus.php
@@ -42,7 +42,7 @@
}
/**
- * @param $repo FileRepo
+ * @param $repo FileRepo|bool Default: false
* @param $value
* @return FileRepoStatus
*/
diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php
index 09ae3b8..a11dcb7 100644
--- a/includes/logging/LogPager.php
+++ b/includes/logging/LogPager.php
@@ -27,7 +27,10 @@
* @ingroup Pager
*/
class LogPager extends ReverseChronologicalPager {
- private $types = array(), $performer = '', $title = '', $pattern = '';
+ private $types = array();
+ private $performer = '';
+ private $title = '';
+ private $pattern = '';
private $typeCGI = '';
public $mLogEventsList;
@@ -35,13 +38,13 @@
* Constructor
*
* @param LogEventsList $list
- * @param string $types or Array: log types to show
+ * @param string|array $types Log types to show
* @param string $performer the user who made the log entries
* @param string|Title $title the page title the log entries are for
* @param string $pattern do a prefix search rather than an exact title
match
* @param array $conds extra conditions for the query
- * @param int $year The year to start from
- * @param int $month The month to start from
+ * @param int|bool $year The year to start from. Default: false
+ * @param int|bool $month The month to start from. Default: false
* @param string $tagFilter tag
*/
public function __construct( $list, $types = array(), $performer = '',
$title = '', $pattern = '',
diff --git a/includes/normal/UtfNormalTest.php
b/includes/normal/UtfNormalTest.php
index 5118366..ad913b1 100644
--- a/includes/normal/UtfNormalTest.php
+++ b/includes/normal/UtfNormalTest.php
@@ -39,6 +39,7 @@
} else {
/**
* @ignore
+ * @param string $string
* @return string
*/
function pretty( $string ) {
diff --git a/includes/upload/UploadFromChunks.php
b/includes/upload/UploadFromChunks.php
index 2e0b944..cba135f 100644
--- a/includes/upload/UploadFromChunks.php
+++ b/includes/upload/UploadFromChunks.php
@@ -28,14 +28,17 @@
* @author Michael Dale
*/
class UploadFromChunks extends UploadFromFile {
- protected $mOffset, $mChunkIndex, $mFileKey, $mVirtualTempPath;
+ protected $mOffset;
+ protected $mChunkIndex;
+ protected $mFileKey;
+ protected $mVirtualTempPath;
/**
* Setup local pointers to stash, repo and user (similar to
UploadFromStash)
*
- * @param $user User
- * @param $stash UploadStash
- * @param $repo FileRepo
+ * @param $user User|null Default: null
+ * @param $stash UploadStash|bool Default: false
+ * @param $repo FileRepo|bool Default: false
*/
public function __construct( $user = null, $stash = false, $repo =
false ) {
// user object. sometimes this won't exist, as when running
from cron.
diff --git a/includes/upload/UploadFromStash.php
b/includes/upload/UploadFromStash.php
index cb85fc6..41b392b 100644
--- a/includes/upload/UploadFromStash.php
+++ b/includes/upload/UploadFromStash.php
@@ -28,7 +28,10 @@
* @author Bryan Tong Minh
*/
class UploadFromStash extends UploadBase {
- protected $mFileKey, $mVirtualTempPath, $mFileProps, $mSourceType;
+ protected $mFileKey;
+ protected $mVirtualTempPath;
+ protected $mFileProps;
+ protected $mSourceType;
// an instance of UploadStash
private $stash;
@@ -37,9 +40,9 @@
private $repo;
/**
- * @param $user User
- * @param $stash UploadStash
- * @param $repo FileRepo
+ * @param $user User|bool Default: false
+ * @param $stash UploadStash|bool Default: false
+ * @param $repo FileRepo|bool Default: false
*/
public function __construct( $user = false, $stash = false, $repo =
false ) {
// user object. sometimes this won't exist, as when running
from cron.
--
To view, visit https://gerrit.wikimedia.org/r/87556
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0f02202d075d4a56dc4e37b08d7ac9399e8c86c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits