Code Duplication    Length = 5-5 lines in 2 locations

includes/functions/shared.php 2 locations

@@ 454-458 (lines=5) @@
451
452
		foreach ( $posts as $post ) {
453
			$calendar = simcal_get_calendar( $post );
454
			if ( $calendar instanceof \SimpleCalendar\Abstracts\Calendar ) {
455
				foreach ( $feed_types as $feed_type ) {
456
					delete_transient( '_simple-calendar_feed_id_' . strval( $calendar->id ) . '_' . $feed_type );
457
				}
458
			}
459
		}
460
461
	} else {
@@ 465-469 (lines=5) @@
462
463
		$post = get_post( $id );
464
		$calendar = simcal_get_calendar( $post );
465
		if ( $calendar instanceof \SimpleCalendar\Abstracts\Calendar ) {
466
			foreach ( $feed_types as $feed_type ) {
467
				delete_transient( '_simple-calendar_feed_id_' . strval( $calendar->id ) . '_' . $feed_type );
468
			}
469
		}
470
	}
471
472
	return delete_transient( '_simple-calendar_feed_ids' );