@@ -1314,7 +1314,7 @@ discard block |
||
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 |
||
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 |
||
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'] ]; |
@@ -307,7 +307,7 @@ discard block |
||
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 |
||
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 ); |
@@ -121,6 +121,9 @@ |
||
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 |
@@ -142,6 +142,9 @@ |
||
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
145 | + /** |
|
146 | + * @param integer $value |
|
147 | + */ |
|
145 | 148 | protected function formatDate( $value ) { |
146 | 149 | switch ( $this->mType ) { |
147 | 150 | case 'date': |
@@ -21,10 +21,6 @@ |
||
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @param array $config Configuration options |
24 | - * @param string $config['type'] 'date', 'time', or 'datetime' |
|
25 | - * @param string $config['min'] Minimum date, time, or datetime |
|
26 | - * @param string $config['max'] Maximum date, time, or datetime |
|
27 | - * @param bool $config['clearable'] Whether to provide for blanking the value. |
|
28 | 24 | */ |
29 | 25 | public function __construct( array $config = [] ) { |
30 | 26 | // We need $this->type set before calling the parent constructor |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * Get the default action for this special page, if none is given via URL/POST data. |
197 | 197 | * Subclasses should override this (or override loadAuth() so this is never called). |
198 | 198 | * @param string $subPage Subpage of the special page. |
199 | - * @return string an AuthManager::ACTION_* constant. |
|
199 | + * @return string|null an AuthManager::ACTION_* constant. |
|
200 | 200 | */ |
201 | 201 | protected function getDefaultAction( $subPage ) { |
202 | 202 | throw new BadMethodCallException( 'Subclass did not implement getDefaultAction' ); |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | * Get an array value, or a default if it does not exist. |
733 | 733 | * @param array $array |
734 | 734 | * @param string $fieldName |
735 | - * @param mixed $default |
|
735 | + * @param integer $default |
|
736 | 736 | * @return mixed |
737 | 737 | */ |
738 | 738 | protected static function getField( array $array, $fieldName, $default = null ) { |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | unset( $this->db ); |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @param integer $row |
|
90 | + */ |
|
88 | 91 | public function seek( $row ) { |
89 | 92 | $this->cursor = min( $row, $this->nrows ); |
90 | 93 | } |
@@ -440,6 +443,9 @@ discard block |
||
440 | 443 | } |
441 | 444 | } |
442 | 445 | |
446 | + /** |
|
447 | + * @return string |
|
448 | + */ |
|
443 | 449 | function lastError() { |
444 | 450 | if ( $this->mConn === false ) { |
445 | 451 | $e = oci_error(); |
@@ -480,6 +486,9 @@ discard block |
||
480 | 486 | return false; |
481 | 487 | } |
482 | 488 | |
489 | + /** |
|
490 | + * @param string $table |
|
491 | + */ |
|
483 | 492 | function insert( $table, $a, $fname = __METHOD__, $options = [] ) { |
484 | 493 | if ( !count( $a ) ) { |
485 | 494 | return true; |
@@ -509,6 +518,9 @@ discard block |
||
509 | 518 | return $retVal; |
510 | 519 | } |
511 | 520 | |
521 | + /** |
|
522 | + * @param string $table |
|
523 | + */ |
|
512 | 524 | private function fieldBindStatement( $table, $col, &$val, $includeCol = false ) { |
513 | 525 | $col_info = $this->fieldInfoMulti( $table, $col ); |
514 | 526 | $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; |
@@ -751,6 +763,9 @@ discard block |
||
751 | 763 | return strtoupper( parent::tableName( $name, $format ) ); |
752 | 764 | } |
753 | 765 | |
766 | + /** |
|
767 | + * @param string $name |
|
768 | + */ |
|
754 | 769 | function tableNameInternal( $name ) { |
755 | 770 | $name = $this->tableName( $name ); |
756 | 771 | |
@@ -1173,6 +1188,9 @@ discard block |
||
1173 | 1188 | return true; |
1174 | 1189 | } |
1175 | 1190 | |
1191 | + /** |
|
1192 | + * @param string $db |
|
1193 | + */ |
|
1176 | 1194 | function selectDB( $db ) { |
1177 | 1195 | $this->mDBname = $db; |
1178 | 1196 | if ( $db == null || $db == $this->mUser ) { |
@@ -1208,6 +1226,9 @@ discard block |
||
1208 | 1226 | return "'" . $this->strencode( $s ) . "'"; |
1209 | 1227 | } |
1210 | 1228 | |
1229 | + /** |
|
1230 | + * @param string $s |
|
1231 | + */ |
|
1211 | 1232 | public function addIdentifierQuotes( $s ) { |
1212 | 1233 | if ( !$this->getFlag( DBO_DDLMODE ) ) { |
1213 | 1234 | $s = '/*Q*/' . $s; |
@@ -1311,6 +1332,10 @@ discard block |
||
1311 | 1332 | return [ $startOpts, $useIndex, $preLimitTail, $postLimitTail, $ignoreIndex ]; |
1312 | 1333 | } |
1313 | 1334 | |
1335 | + /** |
|
1336 | + * @param string $table |
|
1337 | + * @param string $conds |
|
1338 | + */ |
|
1314 | 1339 | public function delete( $table, $conds, $fname = __METHOD__ ) { |
1315 | 1340 | if ( is_array( $conds ) ) { |
1316 | 1341 | $conds = $this->wrapConditionsForWhere( $table, $conds ); |
@@ -1472,6 +1497,9 @@ discard block |
||
1472 | 1497 | return 'BITOR(' . $fieldLeft . ', ' . $fieldRight . ')'; |
1473 | 1498 | } |
1474 | 1499 | |
1500 | + /** |
|
1501 | + * @return string |
|
1502 | + */ |
|
1475 | 1503 | function getDBname() { |
1476 | 1504 | return $this->mDBname; |
1477 | 1505 | } |
@@ -182,7 +182,7 @@ |
||
182 | 182 | /** |
183 | 183 | * Get the Database object in use |
184 | 184 | * |
185 | - * @return IDatabase |
|
185 | + * @return Database|null |
|
186 | 186 | */ |
187 | 187 | public function getDatabase() { |
188 | 188 | return $this->mDb; |
@@ -186,6 +186,11 @@ |
||
186 | 186 | $this->handleResultFromHook( $srchres, $namespaces, $search, $limit, $offset ) ); |
187 | 187 | } |
188 | 188 | |
189 | + /** |
|
190 | + * @param string $search |
|
191 | + * @param integer $limit |
|
192 | + * @param integer $offset |
|
193 | + */ |
|
189 | 194 | private function handleResultFromHook( $srchres, $namespaces, $search, $limit, $offset ) { |
190 | 195 | if ( $offset === 0 ) { |
191 | 196 | // Only perform exact db match if offset === 0 |