From 8eb0f2366b1dc64eede28b11a75752b8fef8df24 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sun, 26 Apr 2026 20:43:27 +0300 Subject: [PATCH] remove missed default value --- app/User/UseCases/CreateUserDto.php | 2 +- tests/Unit/Auth/Middleware/AuthMiddlewareTest.php | 1 + tests/Unit/Plan/UseCases/CreatePlanTest.php | 1 + tests/e2e/Controllers/PlanControllerTest.php | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/User/UseCases/CreateUserDto.php b/app/User/UseCases/CreateUserDto.php index a9c38fa..893551a 100644 --- a/app/User/UseCases/CreateUserDto.php +++ b/app/User/UseCases/CreateUserDto.php @@ -9,6 +9,6 @@ class CreateUserDto public function __construct( public EmailAddress $email, public string $passwordHash, - public bool $isAdmin = false, + public bool $isAdmin, ) {} } diff --git a/tests/Unit/Auth/Middleware/AuthMiddlewareTest.php b/tests/Unit/Auth/Middleware/AuthMiddlewareTest.php index 8408384..a78a062 100644 --- a/tests/Unit/Auth/Middleware/AuthMiddlewareTest.php +++ b/tests/Unit/Auth/Middleware/AuthMiddlewareTest.php @@ -35,6 +35,7 @@ class AuthMiddlewareTest extends TestCase $this->user = $this->userRepo->create(new CreateUserDto( email: new EmailAddress('test@test.com'), passwordHash: '', + isAdmin: false, )); $this->middleware = new AuthMiddleware( $this->sessionRepo, diff --git a/tests/Unit/Plan/UseCases/CreatePlanTest.php b/tests/Unit/Plan/UseCases/CreatePlanTest.php index f88bc89..94412b7 100644 --- a/tests/Unit/Plan/UseCases/CreatePlanTest.php +++ b/tests/Unit/Plan/UseCases/CreatePlanTest.php @@ -40,6 +40,7 @@ class CreatePlanTest extends TestCase $this->userRepo->create(new CreateUserDto( email: new EmailAddress('test@test.com'), passwordHash: '', + isAdmin: false, )); $this->createScheduledNode = new CreateScheduledNode( scheduledNodeRepo: $this->scheduledNodeRepo, diff --git a/tests/e2e/Controllers/PlanControllerTest.php b/tests/e2e/Controllers/PlanControllerTest.php index cf0eeb0..eb34ecd 100644 --- a/tests/e2e/Controllers/PlanControllerTest.php +++ b/tests/e2e/Controllers/PlanControllerTest.php @@ -43,6 +43,7 @@ class PlanControllerTest extends TestCase $this->user = $this->userRepo->create(new CreateUserDto( email: new EmailAddress('test@test.com'), passwordHash: '', + isAdmin: false, )); $text = $this->textRepo->create(new CreateTextDto('testname')); $this->nodeRepo->create(new CreateNodeDto(