Fix various type and reference issues
[lhc/web/wiklou.git] / includes / filebackend / FileOpBatch.php
index fc51d78..32b65ba 100644 (file)
@@ -51,7 +51,7 @@ class FileOpBatch {
         *
         * @param array $performOps List of FileOp operations
         * @param array $opts Batch operation options
-        * @param $journal FileJournal Journal to log operations to
+        * @param FileJournal $journal Journal to log operations to
         * @return Status
         */
        public static function attempt( array $performOps, array $opts, FileJournal $journal ) {
@@ -62,6 +62,7 @@ class FileOpBatch {
                if ( $n > self::MAX_BATCH_SIZE ) {
                        $status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE );
                        wfProfileOut( __METHOD__ );
+
                        return $status;
                }
 
@@ -108,6 +109,7 @@ class FileOpBatch {
                                ++$status->failCount;
                                if ( !$ignoreErrors ) {
                                        wfProfileOut( __METHOD__ );
+
                                        return $status; // abort
                                }
                        }
@@ -122,6 +124,7 @@ class FileOpBatch {
                        $subStatus = $journal->logChangeBatch( $entries, $batchId );
                        if ( !$subStatus->isOK() ) {
                                wfProfileOut( __METHOD__ );
+
                                return $subStatus; // abort
                        }
                }
@@ -134,6 +137,7 @@ class FileOpBatch {
                self::runParallelBatches( $pPerformOps, $status );
 
                wfProfileOut( __METHOD__ );
+
                return $status;
        }
 
@@ -145,8 +149,8 @@ class FileOpBatch {
         * within any given sub-batch do not depend on each other.
         * This will abort remaining ops on failure.
         *
-        * @param $pPerformOps Array
-        * @param $status Status
+        * @param array $pPerformOps
+        * @param Status $status
         * @return bool Success
         */
        protected static function runParallelBatches( array $pPerformOps, Status $status ) {
@@ -199,6 +203,7 @@ class FileOpBatch {
                                }
                        }
                }
+
                return $status;
        }
 }