Code Duplication    Length = 4-4 lines in 2 locations

settings/Panels/Personal/Profile.php 2 locations

@@ 106-109 (lines=4) @@
103
		ksort($commonLanguages);
104
		// sort now by displayed language not the iso-code
105
		usort( $languages, function ($a, $b) {
106
			if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
107
				// If a doesn't have a name, but b does, list b before a
108
				return 1;
109
			}
110
			if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
111
				// If a does have a name, but b doesn't, list a before b
112
				return -1;
@@ 110-113 (lines=4) @@
107
				// If a doesn't have a name, but b does, list b before a
108
				return 1;
109
			}
110
			if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
111
				// If a does have a name, but b doesn't, list a before b
112
				return -1;
113
			}
114
			// Otherwise compare the names
115
			return strcmp($a['name'], $b['name']);
116
		});