Code Duplication    Length = 6-6 lines in 2 locations

includes/filerepo/file/ForeignDBFile.php 1 location

@@ 192-197 (lines=6) @@
189
			]
190
		);
191
192
		if ( $pageId !== false ) {
193
			$url = $this->repo->makeUrl( [ 'curid' => $pageId ] );
194
			if ( $url !== false ) {
195
				return $url;
196
			}
197
		}
198
		return null;
199
	}
200

includes/filerepo/file/LocalFile.php 1 location

@@ 781-786 (lines=6) @@
778
	public function getDescriptionShortUrl() {
779
		$pageId = $this->title->getArticleID();
780
781
		if ( $pageId !== null ) {
782
			$url = $this->repo->makeUrl( [ 'curid' => $pageId ] );
783
			if ( $url !== false ) {
784
				return $url;
785
			}
786
		}
787
		return null;
788
	}
789