MAPG-235 new challenge can be created and is prepared
This commit is contained in:
1 parent
99244e93d2
commit
d7147b30d6
14 files changed
+289
-17
No files matched your search
@@ -16,13 +16,13 @@ class UserInChallenge extends Model
|
||||
|
||||
private ?int $challengeId = null;
|
||||
|
||||
private int $round;
|
||||
private int $round = -1;
|
||||
|
||||
private int $score;
|
||||
private int $score = 0;
|
||||
|
||||
private int $timeLeft;
|
||||
private ?int $timeLeft = null;
|
||||
|
||||
private bool $isOwner;
|
||||
private bool $isOwner = false;
|
||||
|
||||
public function setUser(User $user): void
|
||||
{
|
||||
@@ -54,9 +54,11 @@ class UserInChallenge extends Model
|
||||
$this->score = $score;
|
||||
}
|
||||
|
||||
public function setTimeLeft(int $timeLeft): void
|
||||
public function setTimeLeft(?int $timeLeft): void
|
||||
{
|
||||
$this->timeLeft = $timeLeft;
|
||||
if(isset($timeLeft)) {
|
||||
$this->timeLeft = $timeLeft;
|
||||
}
|
||||
}
|
||||
|
||||
public function setIsOwner(bool $isOwner): void
|
||||
|
||||
Reference in new issue
Block a user