Code Duplication    Length = 10-10 lines in 2 locations

includes/misc-functions.php 2 locations

@@ 793-802 (lines=10) @@
790
			return null;
791
		}
792
793
		if ( ! is_int( $params[1] )
794
		     && ! is_float( $params[1] )
795
		     && ! is_string( $params[1] )
796
		     && $params[1] !== null
797
		     && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) )
798
		) {
799
			trigger_error( esc_html__( 'array_column(): The column key should be either a string or an integer.', 'give' ), E_USER_WARNING );
800
801
			return false;
802
		}
803
804
		if ( isset( $params[2] )
805
		     && ! is_int( $params[2] )
@@ 804-813 (lines=10) @@
801
			return false;
802
		}
803
804
		if ( isset( $params[2] )
805
		     && ! is_int( $params[2] )
806
		     && ! is_float( $params[2] )
807
		     && ! is_string( $params[2] )
808
		     && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) )
809
		) {
810
			trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING );
811
812
			return false;
813
		}
814
815
		$paramsInput     = $params[0];
816
		$paramsColumnKey = ( $params[1] !== null ) ? (string) $params[1] : null;