Code Duplication    Length = 7-7 lines in 4 locations

lib/Activity/DeckProvider.php 4 locations

@@ 210-216 (lines=7) @@
207
	}
208
209
	private function parseParamForLabel($subjectParams, $params) {
210
		if (array_key_exists('label', $subjectParams)) {
211
			$params['label'] = [
212
				'type' => 'highlight',
213
				'id' => $subjectParams['label']['id'],
214
				'name' => $subjectParams['label']['title']
215
			];
216
		}
217
		return $params;
218
	}
219
@@ 229-235 (lines=7) @@
226
					'id' => $subjectParams['acl']['participant'],
227
					'name' => $user !== null ? $user->getDisplayName() : $subjectParams['acl']['participant']
228
				];
229
			} else {
230
				$params['acl'] = [
231
					'type' => 'highlight',
232
					'id' => $subjectParams['acl']['participant'],
233
					'name' => $subjectParams['acl']['participant']
234
				];
235
			}
236
		}
237
		return $params;
238
	}
@@ 268-274 (lines=7) @@
265
			$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
266
			return $params;
267
		}
268
		if (array_key_exists('before', $subjectParams)) {
269
			$params['before'] = [
270
				'type' => 'highlight',
271
				'id' => $subjectParams['before'],
272
				'name' => $subjectParams['before']
273
			];
274
		}
275
		if (array_key_exists('after', $subjectParams)) {
276
			$params['after'] = [
277
				'type' => 'highlight',
@@ 275-281 (lines=7) @@
272
				'name' => $subjectParams['before']
273
			];
274
		}
275
		if (array_key_exists('after', $subjectParams)) {
276
			$params['after'] = [
277
				'type' => 'highlight',
278
				'id' => $subjectParams['after'],
279
				'name' => $subjectParams['after']
280
			];
281
		}
282
		return $params;
283
	}
284