X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Ffilebackend%2FFileOpBatch.php;h=78209d8bf8a4d5a7f634758ef3d7a87430f75fdc;hp=95a78977f0f07a639ef1b85c33b4c1009e052ff0;hb=59280c4c929dc9c073e48879d3d44d5e55499c1c;hpb=77a8bbd406de8194432bbc92ce0b781ba44b43bc diff --git a/includes/filebackend/FileOpBatch.php b/includes/filebackend/FileOpBatch.php index 95a78977f0..78209d8bf8 100644 --- a/includes/filebackend/FileOpBatch.php +++ b/includes/filebackend/FileOpBatch.php @@ -69,11 +69,11 @@ class FileOpBatch { $journaled = empty( $opts['nonJournaled'] ); $maxConcurrency = isset( $opts['concurrency'] ) ? $opts['concurrency'] : 1; - $entries = array(); // file journal entry list + $entries = []; // file journal entry list $predicates = FileOp::newPredicates(); // account for previous ops in prechecks - $curBatch = array(); // concurrent FileOp sub-batch accumulation + $curBatch = []; // concurrent FileOp sub-batch accumulation $curBatchDeps = FileOp::newDependencies(); // paths used in FileOp sub-batch - $pPerformOps = array(); // ordered list of concurrent FileOp sub-batches + $pPerformOps = []; // ordered list of concurrent FileOp sub-batches $lastBackend = null; // last op backend name // Do pre-checks for each operation; abort on failure... foreach ( $performOps as $index => $fileOp ) { @@ -86,7 +86,7 @@ class FileOpBatch { || ( $backendName !== $lastBackend && count( $curBatch ) ) ) { $pPerformOps[] = $curBatch; // push this batch - $curBatch = array(); // start a new sub-batch + $curBatch = []; // start a new sub-batch $curBatchDeps = FileOp::newDependencies(); } $lastBackend = $backendName; @@ -159,8 +159,8 @@ class FileOpBatch { continue; } /** @var Status[] $statuses */ - $statuses = array(); - $opHandles = array(); + $statuses = []; + $opHandles = []; // Get the backend; all sub-batch ops belong to a single backend $backend = reset( $performOpsBatch )->getBackend(); // Get the operation handles or actually do it if there is just one.