From 589944dc9964957ceacc072350ccdf55daa73720 Mon Sep 17 00:00:00 2001 From: Omar Herri Date: Mon, 24 Mar 2025 00:03:57 +0000 Subject: [PATCH] Update DriverInterface.php to use ?DateTime The issue is that the $timestamp parameter is optional (has a default value of null), but its type hint is DateTime, which implies it's not nullable. To fix the deprecation warning, the type hint should be updated to ?DateTime to explicitly indicate that it's nullable. --- src/Contracts/DriverInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Contracts/DriverInterface.php b/src/Contracts/DriverInterface.php index 8097e4a..a3f44b3 100644 --- a/src/Contracts/DriverInterface.php +++ b/src/Contracts/DriverInterface.php @@ -41,7 +41,7 @@ public function find($code, $active = 1); * * @return int */ - public function update($code, array $attributes, DateTime $timestamp = null); + public function update($code, array $attributes, ?DateTime $timestamp = null); /** * Remove given currency from storage. @@ -49,4 +49,4 @@ public function update($code, array $attributes, DateTime $timestamp = null); * @return int */ public function delete($code); -} \ No newline at end of file +}