Code Duplication    Length = 6-6 lines in 2 locations

maintenance/migrateFileRepoLayout.php 2 locations

@@ 181-186 (lines=6) @@
178
				}
179
				$sha1 = substr( $sha1Key, 0, strpos( $sha1Key, '.' ) );
180
181
				if ( $oldLayout === 'sha1' ) {
182
					$spath = "{$origBase}/{$sha1[0]}/{$sha1[1]}/{$sha1[2]}/{$sha1}";
183
				} else {
184
					$spath = $be->getContainerStoragePath( "{$repo->getName()}-deleted" ) .
185
						'/' . $repo->getDeletedHashPath( $sha1Key ) . $sha1Key;
186
				}
187
188
				if ( $newLayout === 'sha1' ) {
189
					$dpath = "{$origBase}/{$sha1[0]}/{$sha1[1]}/{$sha1[2]}/{$sha1}";
@@ 188-193 (lines=6) @@
185
						'/' . $repo->getDeletedHashPath( $sha1Key ) . $sha1Key;
186
				}
187
188
				if ( $newLayout === 'sha1' ) {
189
					$dpath = "{$origBase}/{$sha1[0]}/{$sha1[1]}/{$sha1[2]}/{$sha1}";
190
				} else {
191
					$dpath = $be->getContainerStoragePath( "{$repo->getName()}-deleted" ) .
192
						'/' . $repo->getDeletedHashPath( $sha1Key ) . $sha1Key;
193
				}
194
195
				$status = $be->prepare( [
196
					'dir' => dirname( $dpath ), 'bypassReadOnly' => 1 ] );