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

@@ -217,7 +217,7 @@
Loading
217 217
     */
218 218
    public function diffInDays($date = null, $absolute = true)
219 219
    {
220 -
        return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute));
220 +
        return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%a');
221 221
    }
222 222
223 223
    /**
@@ -518,7 +518,7 @@
Loading
518 518
            return $hoursDiff / static::HOURS_PER_DAY;
519 519
        }
520 520
521 -
        $daysDiff = $this->getIntervalDayDiff($interval);
521 +
        $daysDiff = (int) $interval->format('%r%a');
522 522
523 523
        return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY;
524 524
    }
@@ -1149,17 +1149,4 @@
Loading
1149 1149
1150 1150
        return $this->isoFormat((string) $format);
1151 1151
    }
1152 -
1153 -
    private function getIntervalDayDiff(DateInterval $interval): int
1154 -
    {
1155 -
        $daysDiff = (int) $interval->format('%r%a');
1156 -
1157 -
        // Work around PHP 8.1 regression (see https://bugs.php.net/bug.php?id=81458)
1158 -
        if ($daysDiff === 0) {
1159 -
            $daysDiff = ($interval->invert ? -1 : 1) *
1160 -
                ($interval->y * static::DAYS_PER_YEAR + $interval->m * 30 + $interval->d);
1161 -
        }
1162 -
1163 -
        return $daysDiff;
1164 -
    }
1165 1152
}
Files Complexity Coverage
src/Carbon 2,158 100.00%
Project Totals (886 files) 2158 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