Code Duplication    Length = 4-4 lines in 2 locations

includes/api/class-wc-rest-authentication.php 2 locations

@@ 99-102 (lines=4) @@
96
		$consumer_secret = '';
97
98
		// If the $_GET parameters are present, use those first.
99
		if ( ! empty( $_GET['consumer_key'] ) && ! empty( $_GET['consumer_secret'] ) ) {
100
			$consumer_key    = $_GET['consumer_key'];
101
			$consumer_secret = $_GET['consumer_secret'];
102
		}
103
104
		// If the above is not present, we will do full basic auth.
105
		if ( ! $consumer_key && ! empty( $_SERVER['PHP_AUTH_USER'] ) && ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
@@ 105-108 (lines=4) @@
102
		}
103
104
		// If the above is not present, we will do full basic auth.
105
		if ( ! $consumer_key && ! empty( $_SERVER['PHP_AUTH_USER'] ) && ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
106
			$consumer_key    = $_SERVER['PHP_AUTH_USER'];
107
			$consumer_secret = $_SERVER['PHP_AUTH_PW'];
108
		}
109
110
		// Stop if don't have any key.
111
		if ( ! $consumer_key || ! $consumer_secret ) {