Code Duplication    Length = 16-17 lines in 3 locations

lib/AppInfo/Application.php 3 locations

@@ 192-207 (lines=16) @@
189
		/**
190
		 * Controller
191
		 */
192
		$container->registerService('SettingsController', function (IAppContainer $c) {
193
			/** @var \OC\Server $server */
194
			$server = $c->query('ServerContainer');
195
196
			return new Settings(
197
				$c->getAppName(),
198
				$server->getRequest(),
199
				$server->getConfig(),
200
				$server->getSecureRandom(),
201
				$server->getURLGenerator(),
202
				$c->query('ActivityData'),
203
				$c->query('UserSettings'),
204
				$c->query('OCP\IL10N'),
205
				$c->query('CurrentUser')
206
			);
207
		});
208
209
		$container->registerService('OCA\Activity\Controller\OCSEndPoint', function (IAppContainer $c) {
210
			/** @var \OC\Server $server */
@@ 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
	/**