From f4e92a8f31d3da072dbf3a332201b59be1c75f36 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sat, 1 Apr 2023 19:40:23 +0300 Subject: [PATCH] Avoiding an error warning in UserFactory. --- src/Factory/UserFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Factory/UserFactory.php b/src/Factory/UserFactory.php index a7f0d49..fac27c1 100644 --- a/src/Factory/UserFactory.php +++ b/src/Factory/UserFactory.php @@ -31,7 +31,7 @@ class UserFactory extends AbstractFactory /** @var User $user */ if (null === ($user = $this->userRepository->find($userData->getId()))) { $user = new User( - $userData->getId(), + (int) $userData->getId(), \DateTime::createFromFormat('Y-m-d_H:i:s', $userData->getCreated()) ?: new \DateTime() ); $this->userRepository->add($user);