Code Duplication    Length = 4-8 lines in 2 locations

includes/user/User.php 2 locations

@@ 1872-1875 (lines=4) @@
1869
		if ( isset( $limits['ip-all'] ) ) {
1870
			$ip = $this->getRequest()->getIP();
1871
			// ignore if user limit is more permissive
1872
			if ( $isNewbie || $userLimit === false
1873
				|| $limits['ip-all'][0] / $limits['ip-all'][1] > $userLimit[0] / $userLimit[1] ) {
1874
				$keys["mediawiki:limiter:$action:ip-all:$ip"] = $limits['ip-all'];
1875
			}
1876
		}
1877
1878
		// subnet-based limits for all ping-limitable users
@@ 1882-1889 (lines=8) @@
1879
		if ( isset( $limits['subnet-all'] ) ) {
1880
			$ip = $this->getRequest()->getIP();
1881
			$subnet = IP::getSubnet( $ip );
1882
			if ( $subnet !== false ) {
1883
				// ignore if user limit is more permissive
1884
				if ( $isNewbie || $userLimit === false
1885
					|| $limits['ip-all'][0] / $limits['ip-all'][1]
1886
					> $userLimit[0] / $userLimit[1] ) {
1887
					$keys["mediawiki:limiter:$action:subnet-all:$subnet"] = $limits['subnet-all'];
1888
				}
1889
			}
1890
		}
1891
1892
		$cache = ObjectCache::getLocalClusterInstance();