Code Duplication    Length = 16-16 lines in 2 locations

includes/specials/SpecialVersion.php 2 locations

@@ 84-99 (lines=16) @@
81
				$wikiText = '{{int:version-credits-not-found}}';
82
				if ( $extName === 'MediaWiki' ) {
83
					$wikiText = file_get_contents( $IP . '/CREDITS' );
84
				} elseif ( ( $extNode !== null ) && isset( $extNode['path'] ) ) {
85
					$file = $this->getExtAuthorsFileName( dirname( $extNode['path'] ) );
86
					if ( $file ) {
87
						$wikiText = file_get_contents( $file );
88
						if ( substr( $file, -4 ) === '.txt' ) {
89
							$wikiText = Html::element(
90
								'pre',
91
								[
92
									'lang' => 'en',
93
									'dir' => 'ltr',
94
								],
95
								$wikiText
96
							);
97
						}
98
					}
99
				}
100
101
				$out->setPageTitle( $this->msg( 'version-credits-title', $extName ) );
102
				$out->addWikiText( $wikiText );
@@ 107-122 (lines=16) @@
104
105
			case 'license':
106
				$wikiText = '{{int:version-license-not-found}}';
107
				if ( $extName === 'MediaWiki' ) {
108
					$wikiText = file_get_contents( $IP . '/COPYING' );
109
				} elseif ( ( $extNode !== null ) && isset( $extNode['path'] ) ) {
110
					$file = $this->getExtLicenseFileName( dirname( $extNode['path'] ) );
111
					if ( $file ) {
112
						$wikiText = file_get_contents( $file );
113
						$wikiText = Html::element(
114
							'pre',
115
							[
116
								'lang' => 'en',
117
								'dir' => 'ltr',
118
							],
119
							$wikiText
120
						);
121
					}
122
				}
123
124
				$out->setPageTitle( $this->msg( 'version-license-title', $extName ) );
125
				$out->addWikiText( $wikiText );