Merge "[search] Fix method call on null value"
[lhc/web/wiklou.git] / includes / filebackend / FileBackend.php
index b87e26d..8d76e96 100644 (file)
@@ -375,17 +375,15 @@ abstract class FileBackend {
                if ( empty( $opts['force'] ) ) { // sanity
                        unset( $opts['nonLocking'] );
                }
-               foreach ( $ops as &$op ) {
-                       if ( isset( $op['disposition'] ) ) { // b/c (MW 1.20)
-                               $op['headers']['Content-Disposition'] = $op['disposition'];
-                       }
-               }
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doOperationsInternal( $ops, $opts );
        }
 
        /**
         * @see FileBackend::doOperations()
+        * @param array $ops
+        * @param array $opts
         */
        abstract protected function doOperationsInternal( array $ops, array $opts );
 
@@ -608,16 +606,15 @@ abstract class FileBackend {
                }
                foreach ( $ops as &$op ) {
                        $op['overwrite'] = true; // avoids RTTs in key/value stores
-                       if ( isset( $op['disposition'] ) ) { // b/c (MW 1.20)
-                               $op['headers']['Content-Disposition'] = $op['disposition'];
-                       }
                }
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doQuickOperationsInternal( $ops );
        }
 
        /**
         * @see FileBackend::doQuickOperations()
+        * @param array $ops
         * @since 1.20
         */
        abstract protected function doQuickOperationsInternal( array $ops );
@@ -756,12 +753,14 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doPrepare( $params );
        }
 
        /**
         * @see FileBackend::prepare()
+        * @param array $params
         */
        abstract protected function doPrepare( array $params );
 
@@ -785,12 +784,14 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doSecure( $params );
        }
 
        /**
         * @see FileBackend::secure()
+        * @param array $params
         */
        abstract protected function doSecure( array $params );
 
@@ -816,12 +817,14 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doPublish( $params );
        }
 
        /**
         * @see FileBackend::publish()
+        * @param array $params
         */
        abstract protected function doPublish( array $params );
 
@@ -840,12 +843,14 @@ abstract class FileBackend {
                if ( empty( $params['bypassReadOnly'] ) && $this->isReadOnly() ) {
                        return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
                }
+               /** @noinspection PhpUnusedLocalVariableInspection */
                $scope = $this->getScopedPHPBehaviorForOps(); // try to ignore client aborts
                return $this->doClean( $params );
        }
 
        /**
         * @see FileBackend::clean()
+        * @param array $params
         */
        abstract protected function doClean( array $params );
 
@@ -1289,7 +1294,7 @@ abstract class FileBackend {
         *
         * @param array $ops List of file operations to FileBackend::doOperations()
         * @param Status $status Status to update on lock/unlock
-        * @return array List of ScopedFileLocks or null values
+        * @return ScopedLock|null
         * @since 1.20
         */
        abstract public function getScopedLocksForOps( array $ops, Status $status );