From a0e86a6ca546a64bf547614a21f74e64441dbf51 Mon Sep 17 00:00:00 2001 From: bakaneko Date: Tue, 24 Oct 2023 21:25:14 +0900 Subject: [PATCH] remove for now --- database/factories/BeatmapDiscussionFactory.php | 4 ++-- database/factories/BeatmapsetFactory.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/factories/BeatmapDiscussionFactory.php b/database/factories/BeatmapDiscussionFactory.php index 9db3d8372e8..4d4abf7c491 100644 --- a/database/factories/BeatmapDiscussionFactory.php +++ b/database/factories/BeatmapDiscussionFactory.php @@ -41,7 +41,7 @@ public function general() public function mapperNote() { - return $this->state(['message_type' => 'mapper_note']); + return $this->messageType('mapper_note'); } public function messageType(string $type) @@ -51,7 +51,7 @@ public function messageType(string $type) public function problem() { - return $this->state(['message_type' => 'problem']); + return $this->messageType('problem'); } public function review() diff --git a/database/factories/BeatmapsetFactory.php b/database/factories/BeatmapsetFactory.php index 63148e0d414..8c15681d933 100644 --- a/database/factories/BeatmapsetFactory.php +++ b/database/factories/BeatmapsetFactory.php @@ -94,11 +94,11 @@ public function withDescription(): static }); } - public function withDiscussion(string $type = 'problem') + public function withDiscussion() { return $this ->has(Beatmap::factory()->state(fn (array $attr, Beatmapset $set) => ['user_id' => $set->user_id])) - ->has(BeatmapDiscussion::factory()->general()->messageType($type)->state(fn (array $attr, Beatmapset $set) => [ + ->has(BeatmapDiscussion::factory()->general()->state(fn (array $attr, Beatmapset $set) => [ 'user_id' => $set->user_id, ])); }