Use date resolution for comparison
Showing 1 of 2 files from the diff.
src/Carbon/Traits/Comparison.php
changed.
Other files ignored by Codecov
tests/Carbon/ComparisonTest.php
has changed.
@@ -75,7 +75,7 @@
Loading
75 | 75 | */ |
|
76 | 76 | public function equalTo($date): bool |
|
77 | 77 | { |
|
78 | - | return $this == $date; |
|
78 | + | return $this == $this->resolveCarbon($date); |
|
79 | 79 | } |
|
80 | 80 | ||
81 | 81 | /** |
@@ -155,7 +155,7 @@
Loading
155 | 155 | */ |
|
156 | 156 | public function greaterThan($date): bool |
|
157 | 157 | { |
|
158 | - | return $this > $date; |
|
158 | + | return $this > $this->resolveCarbon($date); |
|
159 | 159 | } |
|
160 | 160 | ||
161 | 161 | /** |
@@ -256,7 +256,7 @@
Loading
256 | 256 | */ |
|
257 | 257 | public function lessThan($date): bool |
|
258 | 258 | { |
|
259 | - | return $this < $date; |
|
259 | + | return $this < $this->resolveCarbon($date); |
|
260 | 260 | } |
|
261 | 261 | ||
262 | 262 | /** |
Files | Complexity | Coverage |
---|---|---|
src/Carbon | 2,164 | 100.00% |
Project Totals (886 files) | 2164 | 100.00% |
1650644665
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.