Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 80-83 (lines=4) @@
77
		$consumer_secret = '';
78
79
		// If the $_GET parameters are present, use those first.
80
		if ( ! empty( $_GET['consumer_key'] ) && ! empty( $_GET['consumer_secret'] ) ) {
81
			$consumer_key    = $_GET['consumer_key'];
82
			$consumer_secret = $_GET['consumer_secret'];
83
		}
84
85
		// If the above is not present, we will do full basic auth.
86
		if ( ! $consumer_key && ! empty( $_SERVER['PHP_AUTH_USER'] ) && ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
@@ 86-89 (lines=4) @@
83
		}
84
85
		// If the above is not present, we will do full basic auth.
86
		if ( ! $consumer_key && ! empty( $_SERVER['PHP_AUTH_USER'] ) && ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
87
			$consumer_key    = $_SERVER['PHP_AUTH_USER'];
88
			$consumer_secret = $_SERVER['PHP_AUTH_PW'];
89
		}
90
91
		// Stop if don't have any key.
92
		if ( ! $consumer_key || ! $consumer_secret ) {