briannesbitt / Carbon
Showing 1 of 2 files from the diff.

@@ -306,11 +306,13 @@
Loading
306 306
        $date = $date->modify("$value $unit");
307 307
308 308
        if (isset($timeString)) {
309 -
            return $date->setTimeFromTimeString($timeString);
309 +
            $date = $date->setTimeFromTimeString($timeString);
310 +
        } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) {
311 +
            $date = $date->modify('last day of previous month');
310 312
        }
311 313
312 -
        if (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) {
313 -
            $date = $date->modify('last day of previous month');
314 +
        if (!$date) {
315 +
            throw new UnitException('Unable to add unit '.var_export(\func_get_args(), true));
314 316
        }
315 317
316 318
        return $date;
Files Complexity Coverage
src/Carbon 2,141 100.00%
Project Totals (886 files) 2141 100.00%

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