Code Duplication    Length = 9-10 lines in 2 locations

classes/autoptimizeStyles.php 2 locations

@@ 787-795 (lines=9) @@
784
        if ( ! $this->alreadyminified ) {
785
            $do_minify = apply_filters( 'autoptimize_css_do_minify', true );
786
787
            if ( $do_minify ) {
788
                $cssmin   = new autoptimizeCSSmin();
789
                $tmp_code = trim( $cssmin->run( $code ) );
790
791
                if ( ! empty( $tmp_code ) ) {
792
                    $code = $tmp_code;
793
                    unset( $tmp_code );
794
                }
795
            }
796
        }
797
798
        return $code;
@@ 853-862 (lines=10) @@
850
                        if ( $iCssCache->check() ) {
851
                            // we have the optimized inline CSS in cache.
852
                            $defer_inline_code = $iCssCache->retrieve();
853
                        } else {
854
                            $cssmin   = new autoptimizeCSSmin();
855
                            $tmp_code = trim( $cssmin->run( $defer_inline_code ) );
856
857
                            if ( ! empty( $tmp_code ) ) {
858
                                $defer_inline_code = $tmp_code;
859
                                $iCssCache->cache( $defer_inline_code, 'text/css' );
860
                                unset( $tmp_code );
861
                            }
862
                        }
863
                    }
864
                    // inlined critical css set here, but injected when full CSS is injected
865
                    // to avoid CSS containing SVG with <title tag receiving the full CSS link.