Code Duplication    Length = 7-7 lines in 2 locations

classes/autoptimizeStyles.php 2 locations

@@ 464-470 (lines=7) @@
461
                 */
462
463
                // Do CDN replacement if needed.
464
                if ( ! empty( $this->cdn_url ) ) {
465
                    $replacement_url = $this->url_replace_cdn( $url );
466
                    // Prepare replacements array.
467
                    $replacements[ $url_src_matches[1][ $count ] ] = str_replace(
468
                        $original_url, $replacement_url, $url_src_matches[1][$count]
469
                    );
470
                }
471
            }
472
        }
473
@@ 584-590 (lines=7) @@
581
                 * inlining isn't turned on, or if a resource is skipped from
582
                 * being inlined for whatever reason above.
583
                 */
584
                if ( ! $inlined && ( ! empty( $this->cdn_url ) || has_filter( 'autoptimize_filter_base_replace_cdn' ) ) ) {
585
                    // Just do the "simple" CDN replacement.
586
                    $replacement_url = $this->url_replace_cdn( $url );
587
                    $imgreplace[ $url_src_matches[1][ $count ] ] = str_replace(
588
                        $original_url, $replacement_url, $url_src_matches[1][$count]
589
                    );
590
                }
591
            }
592
        }
593