Code Duplication    Length = 4-4 lines in 2 locations

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

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