Code Duplication    Length = 8-8 lines in 4 locations

settings/Controller/AppSettingsController.php 4 locations

@@ 306-313 (lines=8) @@
303
				unset($apps[$key]);
304
			}
305
		}
306
		usort($apps, function ($a, $b) {
307
			$a = (string)$a['name'];
308
			$b = (string)$b['name'];
309
			if ($a === $b) {
310
				return 0;
311
			}
312
			return ($a < $b) ? -1 : 1;
313
		});
314
		return $apps;
315
	}
316
@@ 336-343 (lines=8) @@
333
					$apps[$key]['update'] = $newVersion;
334
				}
335
336
				usort($apps, function ($a, $b) {
337
					$a = (string)$a['name'];
338
					$b = (string)$b['name'];
339
					if ($a === $b) {
340
						return 0;
341
					}
342
					return ($a < $b) ? -1 : 1;
343
				});
344
				break;
345
			// updates
346
			case 'updates':
@@ 361-368 (lines=8) @@
358
					$apps[$key]['update'] = $newVersion;
359
				}
360
361
				usort($apps, function ($a, $b) {
362
					$a = (string)$a['name'];
363
					$b = (string)$b['name'];
364
					if ($a === $b) {
365
						return 0;
366
					}
367
					return ($a < $b) ? -1 : 1;
368
				});
369
				break;
370
			// disabled  apps
371
			case 'disabled':
@@ 385-392 (lines=8) @@
382
					return $app;
383
				}, $apps);
384
385
				usort($apps, function ($a, $b) {
386
					$a = (string)$a['name'];
387
					$b = (string)$b['name'];
388
					if ($a === $b) {
389
						return 0;
390
					}
391
					return ($a < $b) ? -1 : 1;
392
				});
393
				break;
394
			case 'app-bundles':
395
				$bundles = $this->bundleFetcher->getBundles();