Code Duplication    Length = 4-7 lines in 2 locations

app/Controller/IndividualListController.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 ($this->getAlphabetForLocale(WT_LOCALE) as $letter) {
256
			$count = 1;
257
			if ($totals) {
258
				$count = Database::prepare($sql . " AND " . $this->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.
@@ 343-346 (lines=4) @@
340
		// Fetch all the letters in our alphabet, whether or not there
341
		// are any names beginning with that letter. It looks better to
342
		// show the full alphabet, rather than omitting rare letters such as X
343
		foreach ($this->getAlphabetForLocale(WT_LOCALE) as $letter) {
344
			$count           = Database::prepare($sql . " AND " . $this->getInitialSql('n_givn', $letter))->fetchOne();
345
			$alphas[$letter] = $count;
346
		}
347
348
		// Now fetch initial letters that are not in our alphabet,
349
		// including "@" (for "@N.N.") and "" for no surname