@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | } |
737 | 737 | |
738 | 738 | /** |
739 | - * @return bool|string |
|
739 | + * @return string|false |
|
740 | 740 | */ |
741 | 741 | protected function restoreErrorHandler() { |
742 | 742 | restore_error_handler(); |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | } |
852 | 852 | |
853 | 853 | /** |
854 | - * @param $sql |
|
854 | + * @param string $sql |
|
855 | 855 | * @return string|null |
856 | 856 | */ |
857 | 857 | protected function getQueryVerb( $sql ) { |
@@ -975,6 +975,12 @@ discard block |
||
975 | 975 | return $res; |
976 | 976 | } |
977 | 977 | |
978 | + /** |
|
979 | + * @param string $sql |
|
980 | + * @param string $commentedSql |
|
981 | + * @param boolean $isWrite |
|
982 | + * @param string $fname |
|
983 | + */ |
|
978 | 984 | private function doProfiledQuery( $sql, $commentedSql, $isWrite, $fname ) { |
979 | 985 | $isMaster = !is_null( $this->getLBInfo( 'master' ) ); |
980 | 986 | # generalizeSQL() will probably cut down the query to reasonable |
@@ -1047,6 +1053,10 @@ discard block |
||
1047 | 1053 | } |
1048 | 1054 | } |
1049 | 1055 | |
1056 | + /** |
|
1057 | + * @param string $sql |
|
1058 | + * @param boolean $priorWritesPending |
|
1059 | + */ |
|
1050 | 1060 | private function canRecoverFromDisconnect( $sql, $priorWritesPending ) { |
1051 | 1061 | # Transaction dropped; this can mean lost writes, or REPEATABLE-READ snapshots. |
1052 | 1062 | # Dropped connections also mean that named locks are automatically released. |
@@ -1268,7 +1278,7 @@ discard block |
||
1268 | 1278 | * |
1269 | 1279 | * @param array $options Associative array of options to be turned into |
1270 | 1280 | * an SQL query, valid keys are listed in the function. |
1271 | - * @return array |
|
1281 | + * @return string[] |
|
1272 | 1282 | * @see DatabaseBase::select() |
1273 | 1283 | */ |
1274 | 1284 | public function makeSelectOptions( $options ) { |
@@ -2462,6 +2472,9 @@ discard block |
||
2462 | 2472 | return $this->insert( $destTable, $rows, $fname, $insertOptions ); |
2463 | 2473 | } |
2464 | 2474 | |
2475 | + /** |
|
2476 | + * @param string $destTable |
|
2477 | + */ |
|
2465 | 2478 | public function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, |
2466 | 2479 | $fname = __METHOD__, |
2467 | 2480 | $insertOptions = [], $selectOptions = [] |
@@ -3287,8 +3300,8 @@ discard block |
||
3287 | 3300 | * on object's error ignore settings). |
3288 | 3301 | * |
3289 | 3302 | * @param string $filename File name to open |
3290 | - * @param bool|callable $lineCallback Optional function called before reading each line |
|
3291 | - * @param bool|callable $resultCallback Optional function called for each MySQL result |
|
3303 | + * @param boolean $lineCallback Optional function called before reading each line |
|
3304 | + * @param boolean $resultCallback Optional function called for each MySQL result |
|
3292 | 3305 | * @param bool|string $fname Calling function name or false if name should be |
3293 | 3306 | * generated dynamically using $filename |
3294 | 3307 | * @param bool|callable $inputCallback Optional function called for each |
@@ -3635,7 +3648,7 @@ discard block |
||
3635 | 3648 | } |
3636 | 3649 | |
3637 | 3650 | /** |
3638 | - * @return string|bool Reason this DB is read-only or false if it is not |
|
3651 | + * @return string|false Reason this DB is read-only or false if it is not |
|
3639 | 3652 | */ |
3640 | 3653 | protected function getReadOnlyReason() { |
3641 | 3654 | $reason = $this->getLBInfo( 'readOnlyReason' ); |
@@ -207,6 +207,10 @@ discard block |
||
207 | 207 | return $result; |
208 | 208 | } |
209 | 209 | |
210 | + /** |
|
211 | + * @param string $filter |
|
212 | + * @param string $data |
|
213 | + */ |
|
210 | 214 | private static function applyFilter( $filter, $data ) { |
211 | 215 | $data = trim( $data ); |
212 | 216 | if ( $data ) { |
@@ -309,7 +313,7 @@ discard block |
||
309 | 313 | * @throws MWException If a duplicate module registration is attempted |
310 | 314 | * @throws MWException If a module name contains illegal characters (pipes or commas) |
311 | 315 | * @throws MWException If something other than a ResourceLoaderModule is being registered |
312 | - * @return bool False if there were any errors, in which case one or more modules were |
|
316 | + * @return boolean|null False if there were any errors, in which case one or more modules were |
|
313 | 317 | * not registered |
314 | 318 | */ |
315 | 319 | public function register( $name, $info = null ) { |
@@ -573,7 +577,7 @@ discard block |
||
573 | 577 | /** |
574 | 578 | * Get the list of sources. |
575 | 579 | * |
576 | - * @return array Like [ id => load.php url, ... ] |
|
580 | + * @return string Like [ id => load.php url, ... ] |
|
577 | 581 | */ |
578 | 582 | public function getSources() { |
579 | 583 | return $this->sources; |
@@ -610,7 +614,7 @@ discard block |
||
610 | 614 | * |
611 | 615 | * @since 1.26 |
612 | 616 | * @param ResourceLoaderContext $context |
613 | - * @param string[] $modules List of known module names |
|
617 | + * @param string[] $moduleNames List of known module names |
|
614 | 618 | * @return string Hash |
615 | 619 | */ |
616 | 620 | public function getCombinedVersion( ResourceLoaderContext $context, array $moduleNames ) { |
@@ -634,7 +638,6 @@ discard block |
||
634 | 638 | * |
635 | 639 | * @since 1.28 |
636 | 640 | * @param ResourceLoaderContext $context |
637 | - * @param string[] $modules List of module names |
|
638 | 641 | * @return string Hash |
639 | 642 | */ |
640 | 643 | public function getExpectedVersionQuery( ResourceLoaderContext $context ) { |