Code Duplication    Length = 4-4 lines in 2 locations

settings/Controller/AppSettingsController.php 2 locations

@@ 315-318 (lines=4) @@
312
			case 'installed':
313
				$apps = $appClass->listAllApps();
314
315
				foreach($apps as $key => $app) {
316
					$newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher);
317
					$apps[$key]['update'] = $newVersion;
318
				}
319
320
				usort($apps, function ($a, $b) {
321
					$a = (string)$a['name'];
@@ 340-343 (lines=4) @@
337
					return $app['active'];
338
				});
339
340
				foreach($apps as $key => $app) {
341
					$newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher);
342
					$apps[$key]['update'] = $newVersion;
343
				}
344
345
				usort($apps, function ($a, $b) {
346
					$a = (string)$a['name'];