Code Duplication    Length = 7-7 lines in 4 locations

lib/Activity/DeckProvider.php 4 locations

@@ 252-258 (lines=7) @@
249
	}
250
251
	private function parseParamForLabel($subjectParams, $params) {
252
		if (array_key_exists('label', $subjectParams)) {
253
			$params['label'] = [
254
				'type' => 'highlight',
255
				'id' => $subjectParams['label']['id'],
256
				'name' => $subjectParams['label']['title']
257
			];
258
		}
259
		return $params;
260
	}
261
@@ 271-277 (lines=7) @@
268
					'id' => $subjectParams['acl']['participant'],
269
					'name' => $user !== null ? $user->getDisplayName() : $subjectParams['acl']['participant']
270
				];
271
			} else {
272
				$params['acl'] = [
273
					'type' => 'highlight',
274
					'id' => $subjectParams['acl']['participant'],
275
					'name' => $subjectParams['acl']['participant']
276
				];
277
			}
278
		}
279
		return $params;
280
	}
@@ 331-337 (lines=7) @@
328
			$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
329
			return $params;
330
		}
331
		if (array_key_exists('before', $subjectParams)) {
332
			$params['before'] = [
333
				'type' => 'highlight',
334
				'id' => $subjectParams['before'],
335
				'name' => $subjectParams['before']
336
			];
337
		}
338
		if (array_key_exists('after', $subjectParams)) {
339
			$params['after'] = [
340
				'type' => 'highlight',
@@ 338-344 (lines=7) @@
335
				'name' => $subjectParams['before']
336
			];
337
		}
338
		if (array_key_exists('after', $subjectParams)) {
339
			$params['after'] = [
340
				'type' => 'highlight',
341
				'id' => $subjectParams['after'],
342
				'name' => $subjectParams['after']
343
			];
344
		}
345
		return $params;
346
	}
347