Code Duplication    Length = 4-4 lines in 2 locations

controller/viewcontroller.php 2 locations

@@ 186-189 (lines=4) @@
183
184
		// sort now by displayed language not the iso-code
185
		usort( $languages, function ($a, $b) {
186
			if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
187
				// If a doesn't have a name, but b does, list b before a
188
				return 1;
189
			}
190
			if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
191
				// If a does have a name, but b doesn't, list a before b
192
				return -1;
@@ 190-193 (lines=4) @@
187
				// If a doesn't have a name, but b does, list b before a
188
				return 1;
189
			}
190
			if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
191
				// If a does have a name, but b doesn't, list a before b
192
				return -1;
193
			}
194
			// Otherwise compare the names
195
			return strcmp($a['name'], $b['name']);
196
		});