Code Duplication    Length = 5-5 lines in 2 locations

includes/misc-functions.php 2 locations

@@ 789-793 (lines=5) @@
786
			return null;
787
		}
788
789
		if ( ! is_int( $params[1] ) && ! is_float( $params[1] ) && ! is_string( $params[1] ) && $params[1] !== null && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) ) {
790
			trigger_error( esc_html__( 'array_column(): The column key should be either a string or an integer.', 'give' ), E_USER_WARNING );
791
792
			return false;
793
		}
794
795
		if ( isset( $params[2] ) && ! is_int( $params[2] ) && ! is_float( $params[2] ) && ! is_string( $params[2] ) && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) ) {
796
			trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING );
@@ 795-799 (lines=5) @@
792
			return false;
793
		}
794
795
		if ( isset( $params[2] ) && ! is_int( $params[2] ) && ! is_float( $params[2] ) && ! is_string( $params[2] ) && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) ) {
796
			trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING );
797
798
			return false;
799
		}
800
801
		$paramsInput     = $params[0];
802
		$paramsColumnKey = ( $params[1] !== null ) ? (string) $params[1] : null;