'alice@example.com', 'displayName' => 'alice'], ['email' => 'bob@example.com', 'displayName' => 'bob'], ['email' => 'carol@example.com', 'displayName' => 'carol'], ]; foreach ($samples as $sample) { $email = new EmailAddress($sample['email']); if ($this->userRepo->findByEmail($email) !== null) { continue; } $this->userRepo->create(new CreateUserDto( email: $email, displayName: $sample['displayName'], passwordHash: $this->hasher->hash('longenoughpassword'), isAdmin: false, emailConfirmedAt: $now, )); } } }