src/Carbon/CarbonInterval.php
changed.
Showing 1 of 1 files from the diff.
@@ -2752,7 +2752,7 @@
Loading
2752 | 2752 | } |
|
2753 | 2753 | ||
2754 | 2754 | if ($interval instanceof self && is_a($className, self::class, true)) { |
|
2755 | - | $instance->setStep($interval->getStep()); |
|
2755 | + | static::copyStep($interval, $instance); |
|
2756 | 2756 | } |
|
2757 | 2757 | ||
2758 | 2758 | static::copyNegativeUnits($interval, $instance); |
@@ -2760,7 +2760,12 @@
Loading
2760 | 2760 | return self::withOriginal($instance, $interval); |
|
2761 | 2761 | } |
|
2762 | 2762 | ||
2763 | - | private static function copyNegativeUnits(DateInterval $from, DateInterval $to) |
|
2763 | + | private static function copyStep(self $from, self $to): void |
|
2764 | + | { |
|
2765 | + | $to->setStep($from->getStep()); |
|
2766 | + | } |
|
2767 | + | ||
2768 | + | private static function copyNegativeUnits(DateInterval $from, DateInterval $to): void |
|
2764 | 2769 | { |
|
2765 | 2770 | $to->invert = $from->invert; |
|
2766 | 2771 |
Files | Coverage |
---|---|
src/Carbon | 100.00% |
Project Totals (885 files) | 100.00% |
429172740
429172740
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.