diff --git a/tests/Support/SupportCarbonTest.php b/tests/Support/SupportCarbonTest.php index 6244192916fe..edb6c2dceeaa 100644 --- a/tests/Support/SupportCarbonTest.php +++ b/tests/Support/SupportCarbonTest.php @@ -42,7 +42,7 @@ public function testInstance() public function testCarbonIsMacroableWhenNotCalledStatically() { Carbon::macro('diffInDecades', function (?Carbon $dt = null, $abs = true) { - return (int) ($this->diffInYears($dt, $abs) / 10); + return intdiv($this->diffInYears($dt, $abs), 10); }); $this->assertSame(2, $this->now->diffInDecades(Carbon::now()->addYears(25)));