Code Duplication    Length = 4-4 lines in 2 locations

controller/viewcontroller.php 2 locations

@@ 177-180 (lines=4) @@
174
175
		// sort now by displayed language not the iso-code
176
		usort( $languages, function ($a, $b) {
177
			if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
178
				// If a doesn't have a name, but b does, list b before a
179
				return 1;
180
			}
181
			if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
182
				// If a does have a name, but b doesn't, list a before b
183
				return -1;
@@ 181-184 (lines=4) @@
178
				// If a doesn't have a name, but b does, list b before a
179
				return 1;
180
			}
181
			if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
182
				// If a does have a name, but b doesn't, list a before b
183
				return -1;
184
			}
185
			// Otherwise compare the names
186
			return strcmp($a['name'], $b['name']);
187
		});