Code Duplication    Length = 17-19 lines in 3 locations

lib/AppInfo/Application.php 3 locations

@@ 74-92 (lines=19) @@
71
			);
72
		});
73
74
		$container->registerService('DataHelper', function(IContainer $c) {
75
			/** @var \OC\Server $server */
76
			$server = $c->query('ServerContainer');
77
			return new DataHelper(
78
				$server->getActivityManager(),
79
				new Factory(
80
					$server->getActivityManager(),
81
					$server->getUserManager(),
82
					$server->getURLGenerator(),
83
					$server->getContactsManager(),
84
					$c->query('OCA\Activity\ViewInfoCache'),
85
					$c->query('OCP\IL10N'),
86
					$server->getGroupManager(),
87
					$c->query('CurrentUID')
88
				),
89
				$server->getL10NFactory(),
90
				$c->query('OCP\IL10N')
91
			);
92
		});
93
94
		$container->registerService('GroupHelper', function(IContainer $c) {
95
			return new GroupHelper(
@@ 209-225 (lines=17) @@
206
			);
207
		});
208
209
		$container->registerService('OCA\Activity\Controller\OCSEndPoint', function(IAppContainer $c) {
210
			/** @var \OC\Server $server */
211
			$server = $c->query('ServerContainer');
212
213
			return new OCSEndPoint(
214
				$c->query('ActivityData'),
215
				$c->query('GroupHelper'),
216
				$c->query('UserSettings'),
217
				$server->getRequest(),
218
				$server->getURLGenerator(),
219
				$server->getUserSession(),
220
				$server->getPreviewManager(),
221
				$server->getMimeTypeDetector(),
222
				new View(''),
223
				$c->query('OCA\Activity\ViewInfoCache')
224
			);
225
		});
226
227
		$container->registerService('EndPointController', function(IAppContainer $c) {
228
			/** @var \OC\Server $server */
@@ 251-267 (lines=17) @@
248
			);
249
		});
250
251
		$container->registerService('FeedController', function(IAppContainer $c) {
252
			/** @var \OC\Server $server */
253
			$server = $c->query('ServerContainer');
254
255
			return new Feed(
256
				$c->getAppName(),
257
				$server->getRequest(),
258
				$c->query('ActivityData'),
259
				$c->query('GroupHelperSingleEntries'),
260
				$c->query('UserSettings'),
261
				$server->getURLGenerator(),
262
				$server->getActivityManager(),
263
				$server->getL10NFactory(),
264
				$server->getConfig(),
265
				$c->query('CurrentUID')
266
			);
267
		});
268
	}
269
270
	/**