Code Duplication    Length = 16-18 lines in 2 locations

includes/api/ApiComparePages.php 1 location

@@ 110-127 (lines=18) @@
107
		);
108
	}
109
110
	public function getAllowedParams() {
111
		return [
112
			'fromtitle' => null,
113
			'fromid' => [
114
				ApiBase::PARAM_TYPE => 'integer'
115
			],
116
			'fromrev' => [
117
				ApiBase::PARAM_TYPE => 'integer'
118
			],
119
			'totitle' => null,
120
			'toid' => [
121
				ApiBase::PARAM_TYPE => 'integer'
122
			],
123
			'torev' => [
124
				ApiBase::PARAM_TYPE => 'integer'
125
			],
126
		];
127
	}
128
129
	protected function getExamplesMessages() {
130
		return [

includes/api/ApiMergeHistory.php 1 location

@@ 107-122 (lines=16) @@
104
		return true;
105
	}
106
107
	public function getAllowedParams() {
108
		return [
109
			'from' => null,
110
			'fromid' => [
111
				ApiBase::PARAM_TYPE => 'integer'
112
			],
113
			'to' => null,
114
			'toid' => [
115
				ApiBase::PARAM_TYPE => 'integer'
116
			],
117
			'timestamp' => [
118
				ApiBase::PARAM_TYPE => 'timestamp'
119
			],
120
			'reason' => '',
121
		];
122
	}
123
124
	public function needsToken() {
125
		return 'csrf';