Forcing every call site to be explicit about admin status and password eliminates a class of bugs where an unintended isAdmin=false or empty passwordHash could silently slip through. The CreateUserTest case that asserted the isAdmin default is dropped since the default no longer exists.
12 lines
202 B
PHP
12 lines
202 B
PHP
<?php
|
|
|
|
namespace App\User\UseCases;
|
|
|
|
class CreateUserRequest
|
|
{
|
|
public function __construct(
|
|
public ?string $email,
|
|
public ?string $password,
|
|
public bool $isAdmin,
|
|
) {}
|
|
}
|