Add a handful of missing @return
authorReedy <reedy@wikimedia.org>
Sun, 9 Dec 2012 03:12:12 +0000 (03:12 +0000)
committerTimo Tijhof <ttijhof@wikimedia.org>
Sat, 16 Feb 2013 16:51:13 +0000 (17:51 +0100)
Change-Id: I21b218e6694600a2d2df4dd0a6b2b5cd2e10f1f9

includes/Sanitizer.php
includes/db/DatabaseMysql.php
includes/db/LoadBalancer.php
includes/diff/DifferenceEngine.php
includes/filerepo/file/ForeignDBFile.php
includes/filerepo/file/LocalFile.php
includes/job/Job.php

index c2d34b0..ff79c59 100644 (file)
@@ -647,6 +647,7 @@ class Sanitizer {
         *
         * @param $params
         * @param $element
+        * @return bool
         */
        static function validateTag( $params, $element ) {
                $params = Sanitizer::decodeTagAttributes( $params );
index c5100b5..4ac7707 100644 (file)
@@ -744,6 +744,7 @@ class DatabaseMysql extends DatabaseBase {
         * @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 @@ class DatabaseMysql extends DatabaseBase {
                }
                $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;
        }
 
        /**
index d42a152..13fa466 100644 (file)
@@ -732,6 +732,7 @@ class LoadBalancer {
 
        /**
         * @param $conn
+        * @return bool
         * @throws DBConnectionError
         */
        function reportConnectionError( &$conn ) {
index a3239a3..c8f1d7f 100644 (file)
@@ -735,6 +735,7 @@ class DifferenceEngine extends ContextSource {
         * @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 @@ class DifferenceEngine extends ContextSource {
         *
         * @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 ) {
index a03df85..b0a1ebf 100644 (file)
@@ -58,6 +58,7 @@ class ForeignDBFile extends LocalFile {
         * @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 @@ class ForeignDBFile extends LocalFile {
         * @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 @@ class ForeignDBFile extends LocalFile {
        /**
         * @param $versions array
         * @param $unsuppress bool
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function restore( $versions = array(), $unsuppress = false ) {
@@ -91,6 +94,7 @@ class ForeignDBFile extends LocalFile {
        /**
         * @param $reason string
         * @param $suppress bool
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function delete( $reason, $suppress = false ) {
@@ -99,6 +103,7 @@ class ForeignDBFile extends LocalFile {
 
        /**
         * @param $target Title
+        * @return \FileRepoStatus
         * @throws MWException
         */
        function move( $target ) {
index 5acaf04..ee49448 100644 (file)
@@ -2382,7 +2382,7 @@ class LocalFileRestoreBatch {
        /**
         * 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 ) {
index e23d1c3..24e9093 100644 (file)
@@ -83,6 +83,7 @@ abstract class Job {
         * 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 @@ abstract class Job {
         * large batches of jobs can cause slave lag.
         *
         * @param $jobs array of Job objects
+        * @return bool
         * @deprecated 1.21
         */
        public static function safeBatchInsert( $jobs ) {