jenkins-bot has submitted this change and it was merged.

Change subject: Add a handful of missing @return
......................................................................


Add a handful of missing @return

Change-Id: I21b218e6694600a2d2df4dd0a6b2b5cd2e10f1f9
---
M includes/Sanitizer.php
M includes/db/DatabaseMysql.php
M includes/db/LoadBalancer.php
M includes/diff/DifferenceEngine.php
M includes/filerepo/file/ForeignDBFile.php
M includes/filerepo/file/LocalFile.php
M includes/job/Job.php
7 files changed, 16 insertions(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index c2d34b0..ff79c59 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -647,6 +647,7 @@
         *
         * @param $params
         * @param $element
+        * @return bool
         */
        static function validateTag( $params, $element ) {
                $params = Sanitizer::decodeTagAttributes( $params );
diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php
index c5100b5..4ac7707 100644
--- a/includes/db/DatabaseMysql.php
+++ b/includes/db/DatabaseMysql.php
@@ -744,6 +744,7 @@
         * @param $write array
         * @param $method string
         * @param $lowPriority bool
+        * @return bool
         */
        public function lockTables( $read, $write, $method, $lowPriority = true 
) {
                $items = array();
@@ -759,13 +760,16 @@
                }
                $sql = "LOCK TABLES " . implode( ',', $items );
                $this->query( $sql, $method );
+               return true;
        }
 
        /**
         * @param $method string
+        * @return bool
         */
        public function unlockTables( $method ) {
                $this->query( "UNLOCK TABLES", $method );
+               return true;
        }
 
        /**
diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index d42a152..13fa466 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -732,6 +732,7 @@
 
        /**
         * @param $conn
+        * @return bool
         * @throws DBConnectionError
         */
        function reportConnectionError( &$conn ) {
diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index a3239a3..c8f1d7f 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -735,6 +735,7 @@
         * @param $old Content: old content
         * @param $new Content: new content
         *
+        * @return bool|string
         * @since 1.21
         * @throws MWException if $old or $new are not instances of TextContent.
         */
@@ -760,6 +761,7 @@
         *
         * @param $otext String: old text, must be already segmented
         * @param $ntext String: new text, must be already segmented
+        * @return bool|string
         * @deprecated since 1.21, use generateContentDiffBody() instead!
         */
        function generateDiffBody( $otext, $ntext ) {
diff --git a/includes/filerepo/file/ForeignDBFile.php 
b/includes/filerepo/file/ForeignDBFile.php
index a03df85..b0a1ebf 100644
--- a/includes/filerepo/file/ForeignDBFile.php
+++ b/includes/filerepo/file/ForeignDBFile.php
@@ -58,6 +58,7 @@
         * @param $srcPath String
         * @param $flags int
         * @param $options Array
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function publish( $srcPath, $flags = 0, array $options = array() ) {
@@ -72,6 +73,7 @@
         * @param $source string
         * @param $watch bool
         * @param $timestamp bool|string
+        * @return bool
         * @throws MWException
         */
        function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', 
$source = '',
@@ -82,6 +84,7 @@
        /**
         * @param $versions array
         * @param $unsuppress bool
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function restore( $versions = array(), $unsuppress = false ) {
@@ -91,6 +94,7 @@
        /**
         * @param $reason string
         * @param $suppress bool
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function delete( $reason, $suppress = false ) {
@@ -99,6 +103,7 @@
 
        /**
         * @param $target Title
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function move( $target ) {
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 5acaf04..ee49448 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2382,7 +2382,7 @@
        /**
         * Delete unused files in the deleted zone.
         * This should be called from outside the transaction in which 
execute() was called.
-        * @return FileRepoStatus|void
+        * @return FileRepoStatus
         */
        function cleanup() {
                if ( !$this->cleanupBatch ) {
diff --git a/includes/job/Job.php b/includes/job/Job.php
index e23d1c3..24e9093 100644
--- a/includes/job/Job.php
+++ b/includes/job/Job.php
@@ -83,6 +83,7 @@
         * removed later on, when the first one is popped.
         *
         * @param $jobs array of Job objects
+        * @return bool
         * @deprecated 1.21
         */
        public static function batchInsert( $jobs ) {
@@ -97,6 +98,7 @@
         * large batches of jobs can cause slave lag.
         *
         * @param $jobs array of Job objects
+        * @return bool
         * @deprecated 1.21
         */
        public static function safeBatchInsert( $jobs ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/37664
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I21b218e6694600a2d2df4dd0a6b2b5cd2e10f1f9
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to