Avoiding an error warning in UserFactory.
This commit is contained in:
parent
8614bd0f26
commit
f4e92a8f31
|
@ -31,7 +31,7 @@ class UserFactory extends AbstractFactory
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
if (null === ($user = $this->userRepository->find($userData->getId()))) {
|
if (null === ($user = $this->userRepository->find($userData->getId()))) {
|
||||||
$user = new User(
|
$user = new User(
|
||||||
$userData->getId(),
|
(int) $userData->getId(),
|
||||||
\DateTime::createFromFormat('Y-m-d_H:i:s', $userData->getCreated()) ?: new \DateTime()
|
\DateTime::createFromFormat('Y-m-d_H:i:s', $userData->getCreated()) ?: new \DateTime()
|
||||||
);
|
);
|
||||||
$this->userRepository->add($user);
|
$this->userRepository->add($user);
|
||||||
|
|
Loading…
Reference in a new issue