Code Duplication    Length = 7-7 lines in 4 locations

lib/Activity/DeckProvider.php 4 locations

@@ 225-231 (lines=7) @@
222
	}
223
224
	private function parseParamForLabel($subjectParams, $params) {
225
		if (array_key_exists('label', $subjectParams)) {
226
			$params['label'] = [
227
				'type' => 'highlight',
228
				'id' => $subjectParams['label']['id'],
229
				'name' => $subjectParams['label']['title']
230
			];
231
		}
232
		return $params;
233
	}
234
@@ 244-250 (lines=7) @@
241
					'id' => $subjectParams['acl']['participant'],
242
					'name' => $user !== null ? $user->getDisplayName() : $subjectParams['acl']['participant']
243
				];
244
			} else {
245
				$params['acl'] = [
246
					'type' => 'highlight',
247
					'id' => $subjectParams['acl']['participant'],
248
					'name' => $subjectParams['acl']['participant']
249
				];
250
			}
251
		}
252
		return $params;
253
	}
@@ 283-289 (lines=7) @@
280
			$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
281
			return $params;
282
		}
283
		if (array_key_exists('before', $subjectParams)) {
284
			$params['before'] = [
285
				'type' => 'highlight',
286
				'id' => $subjectParams['before'],
287
				'name' => $subjectParams['before']
288
			];
289
		}
290
		if (array_key_exists('after', $subjectParams)) {
291
			$params['after'] = [
292
				'type' => 'highlight',
@@ 290-296 (lines=7) @@
287
				'name' => $subjectParams['before']
288
			];
289
		}
290
		if (array_key_exists('after', $subjectParams)) {
291
			$params['after'] = [
292
				'type' => 'highlight',
293
				'id' => $subjectParams['after'],
294
				'name' => $subjectParams['after']
295
			];
296
		}
297
		return $params;
298
	}
299