Completed
Branch master (66f57c)
by
unknown
33:51
created
includes/libs/filebackend/FSFileBackend.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -470,6 +470,10 @@
 block discarded – undo
470 470
 		return $status;
471 471
 	}
472 472
 
473
+	/**
474
+	 * @param string $fullCont
475
+	 * @param string $dirRel
476
+	 */
473 477
 	protected function doSecureInternal( $fullCont, $dirRel, array $params ) {
474 478
 		$status = Status::newGood();
475 479
 		list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] );
Please login to merge, or discard this patch.
includes/libs/rdbms/lbfactory/ILBFactory.php 1 patch
Doc Comments   +16 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,22 +36,8 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * Sub-classes will extend the required keys in $conf with additional parameters
38 38
 	 *
39
-	 * @param $conf $params Array with keys:
40
-	 *  - localDomain: A DatabaseDomain or domain ID string.
41
-	 *  - readOnlyReason : Reason the master DB is read-only if so [optional]
42
-	 *  - srvCache : BagOStuff object for server cache [optional]
43
-	 *  - memCache : BagOStuff object for cluster memory cache [optional]
44
-	 *  - wanCache : WANObjectCache object [optional]
45
-	 *  - hostname : The name of the current server [optional]
46
-	 *  - cliMode: Whether the execution context is a CLI script. [optional]
47
-	 *  - profiler : Class name or instance with profileIn()/profileOut() methods. [optional]
48
-	 *  - trxProfiler: TransactionProfiler instance. [optional]
49
-	 *  - replLogger: PSR-3 logger instance. [optional]
50
-	 *  - connLogger: PSR-3 logger instance. [optional]
51
-	 *  - queryLogger: PSR-3 logger instance. [optional]
52
-	 *  - perfLogger: PSR-3 logger instance. [optional]
53
-	 *  - errorLogger : Callback that takes an Exception and logs it. [optional]
54 39
 	 * @throws InvalidArgumentException
40
+	 * @return void
55 41
 	 */
56 42
 	public function __construct( array $conf );
57 43
 
@@ -59,6 +45,7 @@  discard block
 block discarded – undo
59 45
 	 * Disables all load balancers. All connections are closed, and any attempt to
60 46
 	 * open a new connection will result in a DBAccessError.
61 47
 	 * @see ILoadBalancer::disable()
48
+	 * @return void
62 49
 	 */
63 50
 	public function destroy();
64 51
 
@@ -123,6 +110,7 @@  discard block
 block discarded – undo
123 110
 	 * Prepare all tracked load balancers for shutdown
124 111
 	 * @param integer $mode One of the class SHUTDOWN_* constants
125 112
 	 * @param callable|null $workCallback Work to mask ChronologyProtector writes
113
+	 * @return void
126 114
 	 */
127 115
 	public function shutdown(
128 116
 		$mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null
@@ -132,6 +120,7 @@  discard block
 block discarded – undo
132 120
 	 * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
133 121
 	 *
134 122
 	 * @param string $fname Caller name
123
+	 * @return void
135 124
 	 */
136 125
 	public function flushReplicaSnapshots( $fname = __METHOD__ );
137 126
 
@@ -142,6 +131,7 @@  discard block
 block discarded – undo
142 131
 	 * @param string $fname Caller name
143 132
 	 * @param array $options Options map:
144 133
 	 *   - maxWriteDuration: abort if more than this much time was spent in write queries
134
+	 * @return void
145 135
 	 */
146 136
 	public function commitAll( $fname = __METHOD__, array $options = [] );
147 137
 
@@ -157,6 +147,7 @@  discard block
 block discarded – undo
157 147
 	 *
158 148
 	 * @param string $fname
159 149
 	 * @throws DBTransactionError
150
+	 * @return void
160 151
 	 */
161 152
 	public function beginMasterChanges( $fname = __METHOD__ );
162 153
 
@@ -166,12 +157,14 @@  discard block
 block discarded – undo
166 157
 	 * @param array $options Options map:
167 158
 	 *   - maxWriteDuration: abort if more than this much time was spent in write queries
168 159
 	 * @throws Exception
160
+	 * @return void
169 161
 	 */
170 162
 	public function commitMasterChanges( $fname = __METHOD__, array $options = [] );
171 163
 
172 164
 	/**
173 165
 	 * Rollback changes on all master connections
174 166
 	 * @param string $fname Caller name
167
+	 * @return void
175 168
 	 */
176 169
 	public function rollbackMasterChanges( $fname = __METHOD__ );
177 170
 
@@ -216,6 +209,7 @@  discard block
 block discarded – undo
216 209
 	 *   - timeout : Max wait time. Default: ~60 seconds
217 210
 	 *   - ifWritesSince: Only wait if writes were done since this UNIX timestamp
218 211
 	 * @throws DBReplicationWaitError If a timeout or error occured waiting on a DB cluster
212
+	 * @return void
219 213
 	 */
220 214
 	public function waitForReplication( array $opts = [] );
221 215
 
@@ -226,6 +220,7 @@  discard block
 block discarded – undo
226 220
 	 *
227 221
 	 * @param string $name Callback name
228 222
 	 * @param callable|null $callback Use null to unset a callback
223
+	 * @return void
229 224
 	 */
230 225
 	public function setWaitForReplicationListener( $name, callable $callback = null );
231 226
 
@@ -246,6 +241,7 @@  discard block
 block discarded – undo
246 241
 	 * @param mixed $ticket Result of getEmptyTransactionTicket()
247 242
 	 * @param array $opts Options to waitForReplication()
248 243
 	 * @throws DBReplicationWaitError
244
+	 * @return void
249 245
 	 */
250 246
 	public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] );
251 247
 
@@ -259,6 +255,7 @@  discard block
 block discarded – undo
259 255
 	 * Disable the ChronologyProtector for all load balancers
260 256
 	 *
261 257
 	 * This can be called at the start of special API entry points
258
+	 * @return void
262 259
 	 */
263 260
 	public function disableChronologyProtection();
264 261
 
@@ -266,16 +263,19 @@  discard block
 block discarded – undo
266 263
 	 * Set a new table prefix for the existing local domain ID for testing
267 264
 	 *
268 265
 	 * @param string $prefix
266
+	 * @return void
269 267
 	 */
270 268
 	public function setDomainPrefix( $prefix );
271 269
 
272 270
 	/**
273 271
 	 * Close all open database connections on all open load balancers.
272
+	 * @return void
274 273
 	 */
275 274
 	public function closeAll();
276 275
 
277 276
 	/**
278 277
 	 * @param string $agent Agent name for query profiling
278
+	 * @return void
279 279
 	 */
280 280
 	public function setAgentName( $agent );
281 281
 
@@ -295,6 +295,7 @@  discard block
 block discarded – undo
295 295
 	 *   - IPAddress : IP address
296 296
 	 *   - UserAgent : User-Agent HTTP header
297 297
 	 *   - ChronologyProtection : cookie/header value specifying ChronologyProtector usage
298
+	 * @return void
298 299
 	 */
299 300
 	public function setRequestInfo( array $info );
300 301
 }
Please login to merge, or discard this patch.
includes/Revision.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 	/**
437 437
 	 * Return the list of revision fields that should be selected to create
438 438
 	 * a new revision.
439
-	 * @return array
439
+	 * @return string[]
440 440
 	 */
441 441
 	public static function selectFields() {
442 442
 		global $wgContentHandlerUseDB;
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 	/**
468 468
 	 * Return the list of revision fields that should be selected to create
469 469
 	 * a new revision from an archive row.
470
-	 * @return array
470
+	 * @return string[]
471 471
 	 */
472 472
 	public static function selectArchiveFields() {
473 473
 		global $wgContentHandlerUseDB;
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 	/**
499 499
 	 * Return the list of text fields that should be selected to read the
500 500
 	 * revision text
501
-	 * @return array
501
+	 * @return string[]
502 502
 	 */
503 503
 	public static function selectTextFields() {
504 504
 		return [
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 
510 510
 	/**
511 511
 	 * Return the list of page fields that should be selected from page table
512
-	 * @return array
512
+	 * @return string[]
513 513
 	 */
514 514
 	public static function selectPageFields() {
515 515
 		return [
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 
525 525
 	/**
526 526
 	 * Return the list of user fields that should be selected from user table
527
-	 * @return array
527
+	 * @return string[]
528 528
 	 */
529 529
 	public static function selectUserFields() {
530 530
 		return [ 'user_name' ];
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
 	/**
873 873
 	 * Fetch revision's user id without regard for the current user's permissions
874 874
 	 *
875
-	 * @return string
875
+	 * @return integer
876 876
 	 * @deprecated since 1.25, use getUser( Revision::RAW )
877 877
 	 */
878 878
 	public function getRawUser() {
@@ -1795,7 +1795,7 @@  discard block
 block discarded – undo
1795 1795
 	 *
1796 1796
 	 * @param Title $title
1797 1797
 	 * @param int $id
1798
-	 * @return string|bool False if not found
1798
+	 * @return string|false False if not found
1799 1799
 	 */
1800 1800
 	static function getTimestampFromId( $title, $id, $flags = 0 ) {
1801 1801
 		$db = ( $flags & self::READ_LATEST )
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
 	 * @param IDatabase $db
1895 1895
 	 * @param int $pageId Page ID
1896 1896
 	 * @param int $revId Known current revision of this page
1897
-	 * @return Revision|bool Returns false if missing
1897
+	 * @return Revision Returns false if missing
1898 1898
 	 * @since 1.28
1899 1899
 	 */
1900 1900
 	public static function newKnownCurrent( IDatabase $db, $pageId, $revId ) {
Please login to merge, or discard this patch.
includes/revisiondelete/RevisionDeleteUser.php 1 patch
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -126,16 +126,27 @@
 block discarded – undo
126 126
 		return true;
127 127
 	}
128 128
 
129
+	/**
130
+	 * @param string $field
131
+	 * @param string $op
132
+	 * @param null|IDatabase $dbw
133
+	 */
129 134
 	private static function buildSetBitDeletedField( $field, $op, $value, $dbw ) {
130 135
 		return $field . ' = ' . ( $op === '&'
131 136
 			? $dbw->bitAnd( $field, $value )
132 137
 			: $dbw->bitOr( $field, $value ) );
133 138
 	}
134 139
 
140
+	/**
141
+	 * @param integer $userId
142
+	 */
135 143
 	public static function suppressUserName( $name, $userId, $dbw = null ) {
136 144
 		return self::setUsernameBitfields( $name, $userId, '|', $dbw );
137 145
 	}
138 146
 
147
+	/**
148
+	 * @param integer|null $userId
149
+	 */
139 150
 	public static function unsuppressUserName( $name, $userId, $dbw = null ) {
140 151
 		return self::setUsernameBitfields( $name, $userId, '&', $dbw );
141 152
 	}
Please login to merge, or discard this patch.
maintenance/cleanupImages.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -117,10 +117,16 @@
 block discarded – undo
117 117
 		return $this->repo->getRootDirectory() . '/' . $this->repo->getHashPath( $name ) . $name;
118 118
 	}
119 119
 
120
+	/**
121
+	 * @param Database|null $db
122
+	 */
120 123
 	private function imageExists( $name, $db ) {
121 124
 		return $db->selectField( 'image', '1', [ 'img_name' => $name ], __METHOD__ );
122 125
 	}
123 126
 
127
+	/**
128
+	 * @param Database|null $db
129
+	 */
124 130
 	private function pageExists( $name, $db ) {
125 131
 		return $db->selectField(
126 132
 			'page',
Please login to merge, or discard this patch.
maintenance/updateSpecialPages.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -121,6 +121,9 @@
 block discarded – undo
121 121
 		}
122 122
 	}
123 123
 
124
+	/**
125
+	 * @param Database|null $dbw
126
+	 */
124 127
 	public function doSpecialPageCacheUpdates( $dbw ) {
125 128
 		global $wgSpecialPageCacheUpdates;
126 129
 
Please login to merge, or discard this patch.
includes/libs/filebackend/SwiftFileBackend.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1314,7 +1314,7 @@  discard block
 block discarded – undo
1314 1314
 	 * (lists are truncated to 10000 item with no way to page), and is just a performance risk.
1315 1315
 	 *
1316 1316
 	 * @param string $container Resolved Swift container
1317
-	 * @param array $readGrps List of the possible criteria for a request to have
1317
+	 * @param string[] $readGrps List of the possible criteria for a request to have
1318 1318
 	 * access to read a container. Each item is one of the following formats:
1319 1319
 	 *   - account:user        : Grants access if the request is by the given user
1320 1320
 	 *   - ".r:<regex>"        : Grants access if the request is from a referrer host that
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
 	 *                           Setting this to '*' effectively makes a container public.
1323 1323
 	 *   -".rlistings:<regex>" : Grants access if the request is from a referrer host that
1324 1324
 	 *                           matches the expression and the request is for a listing.
1325
-	 * @param array $writeGrps A list of the possible criteria for a request to have
1325
+	 * @param string[] $writeGrps A list of the possible criteria for a request to have
1326 1326
 	 * access to write to a container. Each item is of the following format:
1327 1327
 	 *   - account:user       : Grants access if the request is by the given user
1328 1328
 	 * @return Status
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
 	 * @param array $creds From getAuthentication()
1706 1706
 	 * @param string $container
1707 1707
 	 * @param string $object
1708
-	 * @return array
1708
+	 * @return string
1709 1709
 	 */
1710 1710
 	protected function storageUrl( array $creds, $container = null, $object = null ) {
1711 1711
 		$parts = [ $creds['storage_url'] ];
Please login to merge, or discard this patch.
includes/libs/objectcache/RedisBagOStuff.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
 	/**
309 309
 	 * @param string $data
310
-	 * @return mixed
310
+	 * @return boolean|string
311 311
 	 */
312 312
 	protected function unserialize( $data ) {
313 313
 		return ctype_digit( $data ) ? intval( $data ) : unserialize( $data );
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 	/**
317 317
 	 * Get a Redis object with a connection suitable for fetching the specified key
318 318
 	 * @param string $key
319
-	 * @return array (server, RedisConnRef) or (false, false)
319
+	 * @return false[] (server, RedisConnRef) or (false, false)
320 320
 	 */
321 321
 	protected function getConnection( $key ) {
322 322
 		$candidates = array_keys( $this->serverTagMap );
Please login to merge, or discard this patch.
maintenance/updateDoubleWidthSearch.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -121,6 +121,9 @@
 block discarded – undo
121 121
 		}
122 122
 	}
123 123
 
124
+	/**
125
+	 * @param Database|null $dbw
126
+	 */
124 127
 	public function doSpecialPageCacheUpdates( $dbw ) {
125 128
 		global $wgSpecialPageCacheUpdates;
126 129
 
Please login to merge, or discard this patch.