Code Duplication    Length = 5-5 lines in 6 locations

includes/filebackend/SwiftFileBackend.php 6 locations

@@ 294-298 (lines=5) @@
291
		};
292
293
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
294
		if ( !empty( $params['async'] ) ) { // deferred
295
			$status->value = $opHandle;
296
		} else { // actually write the object in Swift
297
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
298
		}
299
300
		return $status;
301
	}
@@ 358-362 (lines=5) @@
355
		};
356
357
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
358
		if ( !empty( $params['async'] ) ) { // deferred
359
			$status->value = $opHandle;
360
		} else { // actually write the object in Swift
361
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
362
		}
363
364
		return $status;
365
	}
@@ 406-410 (lines=5) @@
403
		};
404
405
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
406
		if ( !empty( $params['async'] ) ) { // deferred
407
			$status->value = $opHandle;
408
		} else { // actually write the object in Swift
409
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
410
		}
411
412
		return $status;
413
	}
@@ 465-469 (lines=5) @@
462
		};
463
464
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
465
		if ( !empty( $params['async'] ) ) { // deferred
466
			$status->value = $opHandle;
467
		} else { // actually move the object in Swift
468
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
469
		}
470
471
		return $status;
472
	}
@@ 505-509 (lines=5) @@
502
		};
503
504
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
505
		if ( !empty( $params['async'] ) ) { // deferred
506
			$status->value = $opHandle;
507
		} else { // actually delete the object in Swift
508
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
509
		}
510
511
		return $status;
512
	}
@@ 561-565 (lines=5) @@
558
		};
559
560
		$opHandle = new SwiftFileOpHandle( $this, $handler, $reqs );
561
		if ( !empty( $params['async'] ) ) { // deferred
562
			$status->value = $opHandle;
563
		} else { // actually change the object in Swift
564
			$status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
565
		}
566
567
		return $status;
568
	}