Code Duplication    Length = 8-8 lines in 3 locations

settings/Controller/AppSettingsController.php 3 locations

@@ 283-290 (lines=8) @@
280
					$apps[$key]['update'] = $newVersion;
281
				}
282
283
				usort($apps, function ($a, $b) {
284
					$a = (string)$a['name'];
285
					$b = (string)$b['name'];
286
					if ($a === $b) {
287
						return 0;
288
					}
289
					return ($a < $b) ? -1 : 1;
290
				});
291
				break;
292
			// enabled apps
293
			case 'enabled':
@@ 304-311 (lines=8) @@
301
					$apps[$key]['update'] = $newVersion;
302
				}
303
304
				usort($apps, function ($a, $b) {
305
					$a = (string)$a['name'];
306
					$b = (string)$b['name'];
307
					if ($a === $b) {
308
						return 0;
309
					}
310
					return ($a < $b) ? -1 : 1;
311
				});
312
				break;
313
			// disabled  apps
314
			case 'disabled':
@@ 328-335 (lines=8) @@
325
					return $app;
326
				}, $apps);
327
328
				usort($apps, function ($a, $b) {
329
					$a = (string)$a['name'];
330
					$b = (string)$b['name'];
331
					if ($a === $b) {
332
						return 0;
333
					}
334
					return ($a < $b) ? -1 : 1;
335
				});
336
				break;
337
			default:
338
				$apps = $this->getAppsForCategory($category);