Code Duplication    Length = 9-11 lines in 3 locations

includes/logging/ImportLogFormatter.php 1 location

@@ 31-41 (lines=11) @@
28
 * @since 1.27
29
 */
30
class ImportLogFormatter extends LogFormatter {
31
	protected function getMessageKey() {
32
		$key = parent::getMessageKey();
33
		$params = $this->extractParameters();
34
		if ( isset( $params[3] ) ) {
35
			// New log items with more details
36
			// Messages: logentry-import-upload-details, logentry-import-interwiki-details
37
			$key .= '-details';
38
		}
39
40
		return $key;
41
	}
42
}
43

includes/logging/ProtectLogFormatter.php 1 location

@@ 40-49 (lines=10) @@
37
		return [];
38
	}
39
40
	protected function getMessageKey() {
41
		$key = parent::getMessageKey();
42
		$params = $this->extractParameters();
43
		if ( isset( $params[4] ) && $params[4] ) {
44
			// Messages: logentry-protect-protect-cascade, logentry-protect-modify-cascade
45
			$key .= '-cascade';
46
		}
47
48
		return $key;
49
	}
50
51
	protected function getMessageParameters() {
52
		$params = parent::getMessageParameters();

includes/logging/RightsLogFormatter.php 1 location

@@ 59-67 (lines=9) @@
56
		return parent::makePageLink( $title, $parameters, $title ? $title->getText() : null );
57
	}
58
59
	protected function getMessageKey() {
60
		$key = parent::getMessageKey();
61
		$params = $this->getMessageParameters();
62
		if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
63
			// Messages: logentry-rights-rights-legacy
64
			$key .= '-legacy';
65
		}
66
67
		return $key;
68
	}
69
70
	protected function getMessageParameters() {