format backend code
This commit is contained in:
parent
9577367622
commit
67dd376a2f
40 changed files with 146 additions and 71 deletions
|
|
@ -9,5 +9,6 @@ class CreateUserDto
|
|||
public function __construct(
|
||||
public EmailAddress $email,
|
||||
public string $passwordHash,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class EloquentUserRepository implements UserRepository
|
|||
|
||||
public function findByEmailDomain(string $domain): array
|
||||
{
|
||||
$models = UserModel::where('email', 'like', '%@'.$domain)->get();
|
||||
$models = UserModel::where('email', 'like', '%@' . $domain)->get();
|
||||
$users = [];
|
||||
foreach ($models as $model) {
|
||||
$users[] = $this->toDomain($model);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ class User
|
|||
private int $id,
|
||||
private EmailAddress $email,
|
||||
private string $passwordHash,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,12 +9,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property string $email
|
||||
* @property string $password_hash
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserModel newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserModel newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserModel query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserModel whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|UserModel whereId($value)
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserModel extends Model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue