* Just return the ScopedLock itself without wrappig it in an array.
This also makes getScopedLocksForOps() actually return the correct
type according to the docs
Change-Id: Ic2d01d56c3fcb22af3adb5e5d4d1586d62316552
*
* @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 );
* @since 1.19
*/
class FileBackendMultiWrite extends FileBackend {
- /** @var array Prioritized list of FileBackendStore objects.
- * array of (backend index => backends)
- */
+ /** @var FileBackendStore[] Prioritized list of FileBackendStore objects */
protected $backends = array();
/** @var int Index of master backend */
);
// Actually acquire the locks
- return array( $this->getScopedFileLocks( $pbPaths, 'mixed', $status ) );
+ return $this->getScopedFileLocks( $pbPaths, 'mixed', $status );
}
}
public function getScopedLocksForOps( array $ops, Status $status ) {
$paths = $this->getPathsToLockForOpsInternal( $this->getOperationsInternal( $ops ) );
- return array( $this->getScopedFileLocks( $paths, 'mixed', $status ) );
+ return $this->getScopedFileLocks( $paths, 'mixed', $status );
}
final protected function doOperationsInternal( array $ops, array $opts ) {