Skip to content

Commit

Permalink
remove for now
Browse files Browse the repository at this point in the history
  • Loading branch information
notbakaneko committed Oct 24, 2023
1 parent a5bc0e9 commit a0e86a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions database/factories/BeatmapDiscussionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions database/factories/BeatmapsetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]));
}
Expand Down

0 comments on commit a0e86a6

Please sign in to comment.