Code Duplication    Length = 4-7 lines in 2 locations

app/Query/QueryName.php 2 locations

@@ 255-261 (lines=7) @@
252
		// Fetch all the letters in our alphabet, whether or not there
253
		// are any names beginning with that letter. It looks better to
254
		// show the full alphabet, rather than omitting rare letters such as X
255
		foreach (self::getAlphabetForLocale(WT_LOCALE) as $letter) {
256
			$count = 1;
257
			if ($totals) {
258
				$count = Database::prepare($sql . " AND " . self::getInitialSql('n_surn', $letter))->fetchOne();
259
			}
260
			$alphas[$letter] = $count;
261
		}
262
263
		// Now fetch initial letters that are not in our alphabet,
264
		// including "@" (for "@N.N.") and "" for no surname.
@@ 344-347 (lines=4) @@
341
		// Fetch all the letters in our alphabet, whether or not there
342
		// are any names beginning with that letter. It looks better to
343
		// show the full alphabet, rather than omitting rare letters such as X
344
		foreach (self::getAlphabetForLocale(WT_LOCALE) as $letter) {
345
			$count           = Database::prepare($sql . " AND " . self::getInitialSql('n_givn', $letter))->fetchOne();
346
			$alphas[$letter] = $count;
347
		}
348
349
		// Now fetch initial letters that are not in our alphabet,
350
		// including "@" (for "@N.N.") and "" for no surname