@@ -126,16 +126,27 @@ |
||
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 | } |
@@ -117,10 +117,16 @@ |
||
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', |
@@ -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 |
@@ -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 ) { |