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

@@ 771-776 (lines=6) @@
768
	public function getDescriptionShortUrl() {
769
		$pageId = $this->title->getArticleID();
770
771
		if ( $pageId !== null ) {
772
			$url = $this->repo->makeUrl( [ 'curid' => $pageId ] );
773
			if ( $url !== false ) {
774
				return $url;
775
			}
776
		}
777
		return null;
778
	}
779