Code Duplication    Length = 8-8 lines in 3 locations

settings/Controller/AppSettingsController.php 3 locations

@@ 295-302 (lines=8) @@
292
					$apps[$key]['update'] = $newVersion;
293
				}
294
295
				usort($apps, function ($a, $b) {
296
					$a = (string)$a['name'];
297
					$b = (string)$b['name'];
298
					if ($a === $b) {
299
						return 0;
300
					}
301
					return ($a < $b) ? -1 : 1;
302
				});
303
				break;
304
			// enabled apps
305
			case 'enabled':
@@ 316-323 (lines=8) @@
313
					$apps[$key]['update'] = $newVersion;
314
				}
315
316
				usort($apps, function ($a, $b) {
317
					$a = (string)$a['name'];
318
					$b = (string)$b['name'];
319
					if ($a === $b) {
320
						return 0;
321
					}
322
					return ($a < $b) ? -1 : 1;
323
				});
324
				break;
325
			// disabled  apps
326
			case 'disabled':
@@ 340-347 (lines=8) @@
337
					return $app;
338
				}, $apps);
339
340
				usort($apps, function ($a, $b) {
341
					$a = (string)$a['name'];
342
					$b = (string)$b['name'];
343
					if ($a === $b) {
344
						return 0;
345
					}
346
					return ($a < $b) ? -1 : 1;
347
				});
348
				break;
349
			case 'app-bundles':
350
				$bundles = $this->bundleFetcher->getBundles();