Code Duplication    Length = 4-8 lines in 2 locations

includes/user/User.php 2 locations

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