Code Duplication    Length = 9-11 lines in 2 locations

includes/libs/filebackend/SwiftFileBackend.php 2 locations

@@ 764-772 (lines=9) @@
761
			}
762
			// Create a new temporary memory file...
763
			$handle = fopen( 'php://temp', 'wb' );
764
			if ( $handle ) {
765
				$reqs[$path] = [
766
					'method'  => 'GET',
767
					'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
768
					'headers' => $this->authTokenHeaders( $auth )
769
						+ $this->headersFromParams( $params ),
770
					'stream'  => $handle,
771
				];
772
			}
773
			$contents[$path] = false;
774
		}
775
@@ 1127-1137 (lines=11) @@
1124
			$tmpFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory );
1125
			if ( $tmpFile ) {
1126
				$handle = fopen( $tmpFile->getPath(), 'wb' );
1127
				if ( $handle ) {
1128
					$reqs[$path] = [
1129
						'method'  => 'GET',
1130
						'url'     => $this->storageUrl( $auth, $srcCont, $srcRel ),
1131
						'headers' => $this->authTokenHeaders( $auth )
1132
							+ $this->headersFromParams( $params ),
1133
						'stream'  => $handle,
1134
					];
1135
				} else {
1136
					$tmpFile = null;
1137
				}
1138
			}
1139
			$tmpFiles[$path] = $tmpFile;
1140
		}