Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / libs / filebackend / FileBackendStore.php
index b1b7652..7cb26c6 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup FileBackend
  * @author Aaron Schulz
  */
+use Wikimedia\Timestamp\ConvertibleTimestamp;
 
 /**
  * @brief Base class for all backends using particular storage medium.
@@ -359,7 +360,7 @@ abstract class FileBackendStore extends FileBackend {
                        $status->merge( $this->doConcatenate( $params ) );
                        $sec = microtime( true ) - $start_time;
                        if ( !$status->isOK() ) {
-                               $this->logger->error( get_class( $this ) . "-{$this->name}" .
+                               $this->logger->error( static::class . "-{$this->name}" .
                                        " failed to concatenate " . count( $params['srcs'] ) . " file(s) [$sec sec]" );
                        }
                }
@@ -729,7 +730,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * @see FileBackendStore::getFileXAttributes()
         * @param array $params
-        * @return bool|string
+        * @return array[][]
         */
        protected function doGetFileXAttributes( array $params ) {
                return [ 'headers' => [], 'metadata' => [] ]; // not supported
@@ -1098,9 +1099,9 @@ abstract class FileBackendStore extends FileBackend {
 
                // Build the list of paths involved
                $paths = [];
-               foreach ( $performOps as $op ) {
-                       $paths = array_merge( $paths, $op->storagePathsRead() );
-                       $paths = array_merge( $paths, $op->storagePathsChanged() );
+               foreach ( $performOps as $performOp ) {
+                       $paths = array_merge( $paths, $performOp->storagePathsRead() );
+                       $paths = array_merge( $paths, $performOp->storagePathsChanged() );
                }
 
                // Enlarge the cache to fit the stat entries of these files
@@ -1122,7 +1123,7 @@ abstract class FileBackendStore extends FileBackend {
                                $subStatus->success[$i] = false;
                                ++$subStatus->failCount;
                        }
-                       $this->logger->error( get_class( $this ) . "-{$this->name} " .
+                       $this->logger->error( static::class . "-{$this->name} " .
                                " stat failure; aborted operations: " . FormatJson::encode( $ops ) );
                }