Fix various type and reference issues
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Sat, 23 Nov 2013 18:48:43 +0000 (19:48 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Sat, 23 Nov 2013 19:50:02 +0000 (20:50 +0100)
Change-Id: Iced174d9f94faf80c5fa21e15fa6c81b6d8fa21c

includes/filebackend/SwiftFileBackend.php
includes/filebackend/TempFSFile.php
includes/filebackend/lockmanager/FSLockManager.php
includes/filebackend/lockmanager/LockManager.php
includes/filebackend/lockmanager/MemcLockManager.php
includes/filebackend/lockmanager/RedisLockManager.php

index 5c9fdc2..c5111e2 100644 (file)
@@ -1090,7 +1090,8 @@ class SwiftFileBackend extends FileBackendStore {
                try {
                        $container = $this->getContainer( $fullCont );
                        $prefix = ( $dir == '' ) ? null : "{$dir}/";
-                       $objects = array(); // list of unfiltered names or CF_Object items
+
+                       // $objects will contain a list of unfiltered names or CF_Object items
                        // Non-recursive: only list files right under $dir
                        if ( !empty( $params['topOnly'] ) ) {
                                if ( !empty( $params['adviseStat'] ) ) {
index c0070ca..611fab9 100644 (file)
@@ -85,7 +85,7 @@ class TempFSFile extends FSFile {
        /**
         * Clean up the temporary file only after an object goes out of scope
         *
-        * @param Object $object
+        * @param stdClass $object
         * @return TempFSFile This object
         */
        public function bind( $object ) {
index e97ec11..bce6b34 100644 (file)
@@ -102,7 +102,7 @@ class FSLockManager extends LockManager {
        /**
         * Lock a single resource key
         *
-        * @param array $path
+        * @param string $path
         * @param int $type
         * @return Status
         */
@@ -147,7 +147,7 @@ class FSLockManager extends LockManager {
        /**
         * Unlock a single resource key
         *
-        * @param array $path
+        * @param string $path
         * @param int $type
         * @return Status
         */
index 7e06e48..df8d2d4 100644 (file)
@@ -204,8 +204,8 @@ abstract class LockManager {
                                $lockedByType[$type] = $paths;
                        } else {
                                // Release the subset of locks that were acquired
-                               foreach ( $lockedByType as $type => $paths ) {
-                                       $status->merge( $this->doUnlock( $paths, $type ) );
+                               foreach ( $lockedByType as $lType => $lPaths ) {
+                                       $status->merge( $this->doUnlock( $lPaths, $lType ) );
                                }
                                break;
                        }
index 254c693..ccf8613 100644 (file)
@@ -100,8 +100,8 @@ class MemcLockManager extends QuorumLockManager {
                                        ? array_merge( $lockedPaths[$type], $paths )
                                        : $paths;
                        } else {
-                               foreach ( $lockedPaths as $type => $paths ) {
-                                       $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
+                               foreach ( $lockedPaths as $lType => $lPaths ) {
+                                       $status->merge( $this->doFreeLocksOnServer( $lockSrv, $lPaths, $lType ) );
                                }
                                break;
                        }
index 5540f61..9d5612a 100644 (file)
@@ -90,8 +90,8 @@ class RedisLockManager extends QuorumLockManager {
                                        ? array_merge( $lockedPaths[$type], $paths )
                                        : $paths;
                        } else {
-                               foreach ( $lockedPaths as $type => $paths ) {
-                                       $status->merge( $this->doFreeLocksOnServer( $lockSrv, $paths, $type ) );
+                               foreach ( $lockedPaths as $lType => $lPaths ) {
+                                       $status->merge( $this->doFreeLocksOnServer( $lockSrv, $lPaths, $lType ) );
                                }
                                break;
                        }