Code Duplication    Length = 7-9 lines in 2 locations

src/wp-includes/class-wp-comment-query.php 1 location

@@ 565-571 (lines=7) @@
562
					continue;
563
				}
564
565
				if ( is_int( $_key ) ) {
566
					$_orderby = $_value;
567
					$_order = $order;
568
				} else {
569
					$_orderby = $_key;
570
					$_order = $_value;
571
				}
572
573
				if ( ! $found_orderby_comment_ID && in_array( $_orderby, array( 'comment_ID', 'comment__in' ) ) ) {
574
					$found_orderby_comment_ID = true;

src/wp-includes/class-wp-user-query.php 1 location

@@ 399-407 (lines=9) @@
396
				continue;
397
			}
398
399
			if ( is_int( $_key ) ) {
400
				// Integer key means this is a flat array of 'orderby' fields.
401
				$_orderby = $_value;
402
				$_order = $order;
403
			} else {
404
				// Non-integer key means this the key is the field and the value is ASC/DESC.
405
				$_orderby = $_key;
406
				$_order = $_value;
407
			}
408
409
			$parsed = $this->parse_orderby( $_orderby );
410