matthiasmullie / minify
Showing 2 of 3 files from the diff.

@@ -722,7 +722,7 @@
Loading
722 722
            // and since we've captured more code than required, we may have some leftover
723 723
            // calc() in here too - go recursive on the remaining but of code to go figure
724 724
            // that out and extract what is needed
725 -
            $rest = str_replace($function.$expr, '', $match[0]);
725 +
            $rest = $minifier->str_replace_first($function.$expr, '', $match[0]);
726 726
            $rest = preg_replace_callback($pattern, $callback, $rest);
727 727
728 728
            return $placeholder.$rest;

@@ -494,4 +494,12 @@
Loading
494 494
            throw new IOException('The file "'.$path.'" could not be written to. Check your disk space and file permissions.');
495 495
        }
496 496
    }
497 +
498 +
    protected static function str_replace_first($search, $replace, $subject) {
499 +
        $pos = strpos($subject, $search);
500 +
        if ($pos !== false) {
501 +
            return substr_replace($subject, $replace, $pos, strlen($search));
502 +
        }
503 +
        return $subject;
504 +
    }
497 505
}
Files Complexity Coverage
src 120 99.35%
Project Totals (3 files) 120 99.35%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading