Code Duplication    Length = 10-10 lines in 2 locations

includes/misc-functions.php 2 locations

@@ 950-959 (lines=10) @@
947
			return null;
948
		}
949
950
		if ( ! is_int( $params[1] )
951
			 && ! is_float( $params[1] )
952
			 && ! is_string( $params[1] )
953
			 && $params[1] !== null
954
			 && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) )
955
		) {
956
			trigger_error( esc_html__( 'array_column(): The column key should be either a string or an integer.', 'give' ), E_USER_WARNING );
957
958
			return false;
959
		}
960
961
		if ( isset( $params[2] )
962
			 && ! is_int( $params[2] )
@@ 961-970 (lines=10) @@
958
			return false;
959
		}
960
961
		if ( isset( $params[2] )
962
			 && ! is_int( $params[2] )
963
			 && ! is_float( $params[2] )
964
			 && ! is_string( $params[2] )
965
			 && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) )
966
		) {
967
			trigger_error( esc_html__( 'array_column(): The index key should be either a string or an integer.', 'give' ), E_USER_WARNING );
968
969
			return false;
970
		}
971
972
		$paramsInput     = $params[0];
973
		$paramsColumnKey = ( $params[1] !== null ) ? (string) $params[1] : null;