Code Duplication    Length = 17-17 lines in 3 locations

app/Stats.php 3 locations

@@ 1803-1819 (lines=17) @@
1800
	 *
1801
	 * @return string
1802
	 */
1803
	public function commonBirthPlacesList() {
1804
		$places = $this->statsPlaces('INDI', 'BIRT');
1805
		$top10  = [];
1806
		$i      = 1;
1807
		arsort($places);
1808
		foreach ($places as $place => $count) {
1809
			$tmp     = new Place($place, $this->tree);
1810
			$place   = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
1811
			$top10[] = '<li>' . $place . ' - ' . I18N::number($count) . '</li>';
1812
			if ($i++ == 10) {
1813
				break;
1814
			}
1815
		}
1816
		$top10 = implode('', $top10);
1817
1818
		return '<ul>' . $top10 . '</ul>';
1819
	}
1820
1821
	/**
1822
	 * A list of common death places.
@@ 1826-1842 (lines=17) @@
1823
	 *
1824
	 * @return string
1825
	 */
1826
	public function commonDeathPlacesList() {
1827
		$places = $this->statsPlaces('INDI', 'DEAT');
1828
		$top10  = [];
1829
		$i      = 1;
1830
		arsort($places);
1831
		foreach ($places as $place => $count) {
1832
			$tmp     = new Place($place, $this->tree);
1833
			$place   = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
1834
			$top10[] = '<li>' . $place . ' - ' . I18N::number($count) . '</li>';
1835
			if ($i++ == 10) {
1836
				break;
1837
			}
1838
		}
1839
		$top10 = implode('', $top10);
1840
1841
		return '<ul>' . $top10 . '</ul>';
1842
	}
1843
1844
	/**
1845
	 * A list of common marriage places.
@@ 1849-1865 (lines=17) @@
1846
	 *
1847
	 * @return string
1848
	 */
1849
	public function commonMarriagePlacesList() {
1850
		$places = $this->statsPlaces('FAM', 'MARR');
1851
		$top10  = [];
1852
		$i      = 1;
1853
		arsort($places);
1854
		foreach ($places as $place => $count) {
1855
			$tmp     = new Place($place, $this->tree);
1856
			$place   = '<a href="' . $tmp->getURL() . '" class="list_item">' . $tmp->getFullName() . '</a>';
1857
			$top10[] = '<li>' . $place . ' - ' . I18N::number($count) . '</li>';
1858
			if ($i++ == 10) {
1859
				break;
1860
			}
1861
		}
1862
		$top10 = implode('', $top10);
1863
1864
		return '<ul>' . $top10 . '</ul>';
1865
	}
1866
1867
	/**
1868
	 * Create a chart of birth places.