MAPG-235 refactored whitespaces
This commit is contained in:
parent
567602c749
commit
7970927654
@ -340,7 +340,7 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
|
||||
Game.guess();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
displayRestrictions: function () {
|
||||
@ -399,7 +399,7 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
|
||||
Game.timeoutEnd = null;
|
||||
},
|
||||
|
||||
hideRestrictions: function() {
|
||||
hideRestrictions: function () {
|
||||
var restrictions = document.getElementById('restrictions');
|
||||
if (restrictions) {
|
||||
var header = restrictions.parentNode;
|
||||
@ -957,7 +957,7 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
|
||||
|
||||
},
|
||||
|
||||
showHighscores: function() {
|
||||
showHighscores: function () {
|
||||
|
||||
if (Game.type == GameType.CHALLENGE) {
|
||||
var highscores = this.calculateHighScores();
|
||||
|
@ -208,7 +208,7 @@ class GameController implements ISecured
|
||||
|
||||
$room = $this->multiRoomRepository->getByRoomId($roomId);
|
||||
|
||||
if(!isset($room)) {
|
||||
if (!isset($room)) {
|
||||
return new JsonContent(['error' => 'game_not_found']);
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ class GameController implements ISecured
|
||||
return new JsonContent(['error' => 'game_not_found']);
|
||||
}
|
||||
|
||||
if(!$this->userInChallengeRepository->isUserParticipatingInChallenge($userId, $challenge)) {
|
||||
if (!$this->userInChallengeRepository->isUserParticipatingInChallenge($userId, $challenge)) {
|
||||
// new player is joining
|
||||
$userInChallenge = new UserInChallenge();
|
||||
$userInChallenge->setUserId($userId);
|
||||
|
@ -309,9 +309,9 @@ class GameFlowController implements ISecured
|
||||
$session = $this->request->session();
|
||||
$userId = $session->get('userId');
|
||||
|
||||
if(isset($userId)) {
|
||||
if (isset($userId)) {
|
||||
$userPlayedPlace = $this->userPlayedPlaceRepository->getByUserIdAndPlaceId($userId, $placeId);
|
||||
if(!$userPlayedPlace) {
|
||||
if (!$userPlayedPlace) {
|
||||
$userPlayedPlace = new UserPlayedPlace();
|
||||
$userPlayedPlace->setUserId($userId);
|
||||
$userPlayedPlace->setPlaceId($placeId);
|
||||
@ -415,7 +415,7 @@ class GameFlowController implements ISecured
|
||||
$response['restrictions']['timeLimit'] = $timeLimit * 1000;
|
||||
}
|
||||
|
||||
if(isset($response['history'][$currentRound]['allResults'])) {
|
||||
if (isset($response['history'][$currentRound]['allResults'])) {
|
||||
$response['allResults'] = $response['history'][$currentRound]['allResults'];
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ class Select
|
||||
$queryString .= ' LIMIT ' . $this->limit[1] . ', ' . $this->limit[0];
|
||||
}
|
||||
|
||||
if($this->isDerivedTable()) {
|
||||
if ($this->isDerivedTable()) {
|
||||
$queryString = '(' . $queryString . ') AS ' . $this->tableAliases[Select::DERIVED_TABLE_KEY];
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ class Select
|
||||
return [(string) $table, $params];
|
||||
}
|
||||
|
||||
if($table instanceof Select)
|
||||
if ($table instanceof Select)
|
||||
{
|
||||
return $table->generateQuery();
|
||||
}
|
||||
@ -332,7 +332,7 @@ class Select
|
||||
$joinQueries = [];
|
||||
$params = [];
|
||||
|
||||
foreach($this->joins as $join) {
|
||||
foreach ($this->joins as $join) {
|
||||
list($joinQueryFragment, $paramsFragment) = $this->generateTable($join[1], true);
|
||||
$joinQueries[] = $join[0] . ' JOIN ' . $joinQueryFragment . ' ON ' . $this->generateColumn($join[2]) . ' ' . $join[3] . ' ' . $this->generateColumn($join[4]);
|
||||
$params = array_merge($params, $paramsFragment);
|
||||
|
@ -33,7 +33,7 @@ class Challenge extends Model
|
||||
|
||||
public function setTimeLimit(?int $timeLimit): void
|
||||
{
|
||||
if(isset($timeLimit)) {
|
||||
if (isset($timeLimit)) {
|
||||
$this->timeLimit = $timeLimit;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class UserInChallenge extends Model
|
||||
|
||||
public function setTimeLeft(?int $timeLeft): void
|
||||
{
|
||||
if(isset($timeLeft)) {
|
||||
if (isset($timeLeft)) {
|
||||
$this->timeLeft = max(0, $timeLeft);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user