Code Duplication    Length = 4-4 lines in 2 locations

classes/autoptimizeConfig.php 1 location

@@ 786-789 (lines=4) @@
783
            $rss = fetch_feed( $url );
784
            $maxitems = 0;
785
786
            if ( ! is_wp_error( $rss ) ) {
787
                $maxitems = $rss->get_item_quantity( 7 );
788
                $rss_items = $rss->get_items( 0, $maxitems );
789
            }
790
            ?>
791
            <ul>
792
                <?php if ( $maxitems == 0 ) : ?>

classes/autoptimizePartners.php 1 location

@@ 55-58 (lines=4) @@
52
            $rss      = fetch_feed( 'http://feeds.feedburner.com/OptimizingMattersDownloads' );
53
            $maxitems = 0;
54
55
            if ( ! is_wp_error( $rss ) ) {
56
                $maxitems  = $rss->get_item_quantity( 20 );
57
                $rss_items = $rss->get_items( 0, $maxitems );
58
            }
59
60
            if ( 0 == $maxitems ) {
61
                $output .= $no_feed_text;