@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | } |
645 | 645 | |
646 | 646 | /** |
647 | - * @return bool|string |
|
647 | + * @return string|false |
|
648 | 648 | */ |
649 | 649 | protected function restoreErrorHandler() { |
650 | 650 | restore_error_handler(); |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | } |
757 | 757 | |
758 | 758 | /** |
759 | - * @param $sql |
|
759 | + * @param string $sql |
|
760 | 760 | * @return string|null |
761 | 761 | */ |
762 | 762 | protected function getQueryVerb( $sql ) { |
@@ -900,6 +900,12 @@ discard block |
||
900 | 900 | return $res; |
901 | 901 | } |
902 | 902 | |
903 | + /** |
|
904 | + * @param string $sql |
|
905 | + * @param string $commentedSql |
|
906 | + * @param boolean $isWrite |
|
907 | + * @param string $fname |
|
908 | + */ |
|
903 | 909 | private function doProfiledQuery( $sql, $commentedSql, $isWrite, $fname ) { |
904 | 910 | $isMaster = !is_null( $this->getLBInfo( 'master' ) ); |
905 | 911 | # generalizeSQL() will probably cut down the query to reasonable |
@@ -981,6 +987,10 @@ discard block |
||
981 | 987 | } |
982 | 988 | } |
983 | 989 | |
990 | + /** |
|
991 | + * @param string $sql |
|
992 | + * @param boolean $priorWritesPending |
|
993 | + */ |
|
984 | 994 | private function canRecoverFromDisconnect( $sql, $priorWritesPending ) { |
985 | 995 | # Transaction dropped; this can mean lost writes, or REPEATABLE-READ snapshots. |
986 | 996 | # Dropped connections also mean that named locks are automatically released. |
@@ -1100,7 +1110,7 @@ discard block |
||
1100 | 1110 | * |
1101 | 1111 | * @param array $options Associative array of options to be turned into |
1102 | 1112 | * an SQL query, valid keys are listed in the function. |
1103 | - * @return array |
|
1113 | + * @return string[] |
|
1104 | 1114 | * @see DatabaseBase::select() |
1105 | 1115 | */ |
1106 | 1116 | protected function makeSelectOptions( $options ) { |
@@ -2271,6 +2281,9 @@ discard block |
||
2271 | 2281 | return $this->insert( $destTable, $rows, $fname, $insertOptions ); |
2272 | 2282 | } |
2273 | 2283 | |
2284 | + /** |
|
2285 | + * @param string $destTable |
|
2286 | + */ |
|
2274 | 2287 | protected function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, |
2275 | 2288 | $fname = __METHOD__, |
2276 | 2289 | $insertOptions = [], $selectOptions = [] |
@@ -3345,7 +3358,7 @@ discard block |
||
3345 | 3358 | } |
3346 | 3359 | |
3347 | 3360 | /** |
3348 | - * @return string|bool Reason this DB is read-only or false if it is not |
|
3361 | + * @return string|false Reason this DB is read-only or false if it is not |
|
3349 | 3362 | */ |
3350 | 3363 | protected function getReadOnlyReason() { |
3351 | 3364 | $reason = $this->getLBInfo( 'readOnlyReason' ); |
@@ -36,22 +36,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -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 |