chg: dev: change the code style to fit the current standard #4
This commit is contained in:
@@ -62,7 +62,7 @@ class RpcManager implements RpcManagerInterface
|
||||
}
|
||||
}
|
||||
|
||||
$users = $this->getUserCollection($playedGame);
|
||||
$users = $this->getUserCollection($playedGame);
|
||||
$revealedCells = $this->aggregateRevealedCells($playedGame);
|
||||
|
||||
try {
|
||||
@@ -85,9 +85,9 @@ class RpcManager implements RpcManagerInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
$grid2d = $this->generateGrid();
|
||||
$grid2d = $this->generateGrid();
|
||||
$playedGame = new PlayedGame();
|
||||
$grid = new Grid();
|
||||
$grid = new Grid();
|
||||
|
||||
try {
|
||||
foreach ($grid2d as $row) {
|
||||
@@ -127,7 +127,7 @@ class RpcManager implements RpcManagerInterface
|
||||
|
||||
// Fisher-Yates shuffle
|
||||
for ($i = count($set) - 1; $i > 0; $i--) {
|
||||
$j = random_int(0, $i);
|
||||
$j = random_int(0, $i);
|
||||
[$set[$i], $set[$j]] = [$set[$j], $set[$i]];
|
||||
}
|
||||
|
||||
@@ -180,10 +180,10 @@ class RpcManager implements RpcManagerInterface
|
||||
private function getUserCollection(PlayedGame $playedGame): array
|
||||
{
|
||||
return [
|
||||
'red' => null !== $playedGame->getRed() ? $playedGame->getRed()->getUsername() : '',
|
||||
'blue' => null !== $playedGame->getBlue() ? $playedGame->getBlue()->getUsername() : '',
|
||||
'red' => null !== $playedGame->getRed() ? $playedGame->getRed()->getUsername() : '',
|
||||
'blue' => null !== $playedGame->getBlue() ? $playedGame->getBlue()->getUsername() : '',
|
||||
'redAnon' => null !== $playedGame->getRedAnon() ? $playedGame->getRedAnon()->getUserName() : '',
|
||||
'blueAnon' => null !== $playedGame->getBlueAnon()? $playedGame->getBlueAnon()->getUserName(): '',
|
||||
'blueAnon' => null !== $playedGame->getBlueAnon() ? $playedGame->getBlueAnon()->getUserName() : '',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user