Code Duplication    Length = 10-10 lines in 2 locations

includes/misc-functions.php 2 locations

@@ 871-880 (lines=10) @@
868
			return null;
869
		}
870
871
		if ( ! is_int( $params[1] )
872
		     && ! is_float( $params[1] )
873
		     && ! is_string( $params[1] )
874
		     && $params[1] !== null
875
		     && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) )
876
		) {
877
			trigger_error( esc_html__( 'array_column(): The column key should be either a string or an integer.', 'give' ), E_USER_WARNING );
878
879
			return false;
880
		}
881
882
		if ( isset( $params[2] )
883
		     && ! is_int( $params[2] )
@@ 882-891 (lines=10) @@
879
			return false;
880
		}
881
882
		if ( isset( $params[2] )
883
		     && ! is_int( $params[2] )
884
		     && ! is_float( $params[2] )
885
		     && ! is_string( $params[2] )
886
		     && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) )
887
		) {
888
			trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING );
889
890
			return false;
891
		}
892
893
		$paramsInput     = $params[0];
894
		$paramsColumnKey = ( $params[1] !== null ) ? (string) $params[1] : null;