Code Duplication    Length = 6-6 lines in 2 locations

includes/payments/class-give-payment.php 2 locations

@@ 1355-1360 (lines=6) @@
1352
		$meta = apply_filters( "give_get_payment_meta_{$meta_key}", $meta, $this->ID );
1353
1354
		// Security check.
1355
		if ( is_serialized( $meta ) ) {
1356
			preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $meta, $matches );
1357
			if ( ! empty( $matches ) ) {
1358
				$meta = array();
1359
			}
1360
		}
1361
1362
		/**
1363
		 * Filter the all meta keys.
@@ 1735-1740 (lines=6) @@
1732
1733
		$user_info = isset( $this->payment_meta['user_info'] ) ? $this->payment_meta['user_info'] : array();
1734
1735
		if ( is_serialized( $user_info ) ) {
1736
			preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $user_info, $matches );
1737
			if ( ! empty( $matches ) ) {
1738
				$user_info = array();
1739
			}
1740
		}
1741
1742
		$user_info = wp_parse_args( $user_info, $defaults );
1743