Code Duplication    Length = 5-5 lines in 6 locations

includes/libs/filebackend/SwiftFileBackend.php 6 locations

@@ 287-291 (lines=5) @@
284
		};
285
286
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
287
		if ( !empty( $params['async'] ) ) { // deferred
288
			$status->value = $opHandle;
289
		} else { // actually write the object in Swift
290
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
291
		}
292
293
		return $status;
294
	}
@@ 351-355 (lines=5) @@
348
		};
349
350
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
351
		if ( !empty( $params['async'] ) ) { // deferred
352
			$status->value = $opHandle;
353
		} else { // actually write the object in Swift
354
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
355
		}
356
357
		return $status;
358
	}
@@ 399-403 (lines=5) @@
396
		};
397
398
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
399
		if ( !empty( $params['async'] ) ) { // deferred
400
			$status->value = $opHandle;
401
		} else { // actually write the object in Swift
402
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
403
		}
404
405
		return $status;
406
	}
@@ 458-462 (lines=5) @@
455
		};
456
457
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
458
		if ( !empty( $params['async'] ) ) { // deferred
459
			$status->value = $opHandle;
460
		} else { // actually move the object in Swift
461
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
462
		}
463
464
		return $status;
465
	}
@@ 498-502 (lines=5) @@
495
		};
496
497
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
498
		if ( !empty( $params['async'] ) ) { // deferred
499
			$status->value = $opHandle;
500
		} else { // actually delete the object in Swift
501
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
502
		}
503
504
		return $status;
505
	}
@@ 554-558 (lines=5) @@
551
		};
552
553
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
554
		if ( !empty( $params['async'] ) ) { // deferred
555
			$status->value = $opHandle;
556
		} else { // actually change the object in Swift
557
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
558
		}
559
560
		return $status;
561
	}