Code Duplication    Length = 4-8 lines in 2 locations

includes/user/User.php 2 locations

@@ 1888-1891 (lines=4) @@
1885
		if ( isset( $limits['ip-all'] ) ) {
1886
			$ip = $this->getRequest()->getIP();
1887
			// ignore if user limit is more permissive
1888
			if ( $isNewbie || $userLimit === false
1889
				|| $limits['ip-all'][0] / $limits['ip-all'][1] > $userLimit[0] / $userLimit[1] ) {
1890
				$keys["mediawiki:limiter:$action:ip-all:$ip"] = $limits['ip-all'];
1891
			}
1892
		}
1893
1894
		// subnet-based limits for all ping-limitable users
@@ 1898-1905 (lines=8) @@
1895
		if ( isset( $limits['subnet-all'] ) ) {
1896
			$ip = $this->getRequest()->getIP();
1897
			$subnet = IP::getSubnet( $ip );
1898
			if ( $subnet !== false ) {
1899
				// ignore if user limit is more permissive
1900
				if ( $isNewbie || $userLimit === false
1901
					|| $limits['ip-all'][0] / $limits['ip-all'][1]
1902
					> $userLimit[0] / $userLimit[1] ) {
1903
					$keys["mediawiki:limiter:$action:subnet-all:$subnet"] = $limits['subnet-all'];
1904
				}
1905
			}
1906
		}
1907
1908
		$cache = ObjectCache::getLocalClusterInstance();