Code Duplication    Length = 10-10 lines in 2 locations

includes/misc-functions.php 2 locations

@@ 803-812 (lines=10) @@
800
			return null;
801
		}
802
803
		if ( ! is_int( $params[1] )
804
		     && ! is_float( $params[1] )
805
		     && ! is_string( $params[1] )
806
		     && $params[1] !== null
807
		     && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) )
808
		) {
809
			trigger_error( esc_html__( 'array_column(): The column key should be either a string or an integer.', 'give' ), E_USER_WARNING );
810
811
			return false;
812
		}
813
814
		if ( isset( $params[2] )
815
		     && ! is_int( $params[2] )
@@ 814-823 (lines=10) @@
811
			return false;
812
		}
813
814
		if ( isset( $params[2] )
815
		     && ! is_int( $params[2] )
816
		     && ! is_float( $params[2] )
817
		     && ! is_string( $params[2] )
818
		     && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) )
819
		) {
820
			trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING );
821
822
			return false;
823
		}
824
825
		$paramsInput     = $params[0];
826
		$paramsColumnKey = ( $params[1] !== null ) ? (string) $params[1] : null;