Code Duplication    Length = 8-8 lines in 4 locations

settings/Controller/AppSettingsController.php 4 locations

@@ 290-297 (lines=8) @@
287
				unset($apps[$key]);
288
			}
289
		}
290
		usort($apps, function ($a, $b) {
291
			$a = (string)$a['name'];
292
			$b = (string)$b['name'];
293
			if ($a === $b) {
294
				return 0;
295
			}
296
			return ($a < $b) ? -1 : 1;
297
		});
298
		return $apps;
299
	}
300
@@ 320-327 (lines=8) @@
317
					$apps[$key]['update'] = $newVersion;
318
				}
319
320
				usort($apps, function ($a, $b) {
321
					$a = (string)$a['name'];
322
					$b = (string)$b['name'];
323
					if ($a === $b) {
324
						return 0;
325
					}
326
					return ($a < $b) ? -1 : 1;
327
				});
328
				break;
329
			// updates
330
			case 'updates':
@@ 345-352 (lines=8) @@
342
					$apps[$key]['update'] = $newVersion;
343
				}
344
345
				usort($apps, function ($a, $b) {
346
					$a = (string)$a['name'];
347
					$b = (string)$b['name'];
348
					if ($a === $b) {
349
						return 0;
350
					}
351
					return ($a < $b) ? -1 : 1;
352
				});
353
				break;
354
			// disabled  apps
355
			case 'disabled':
@@ 369-376 (lines=8) @@
366
					return $app;
367
				}, $apps);
368
369
				usort($apps, function ($a, $b) {
370
					$a = (string)$a['name'];
371
					$b = (string)$b['name'];
372
					if ($a === $b) {
373
						return 0;
374
					}
375
					return ($a < $b) ? -1 : 1;
376
				});
377
				break;
378
			case 'app-bundles':
379
				$bundles = $this->bundleFetcher->getBundles();