Private
Public Access
1
0

chg: dev: change the code style to fit the current standard #4

This commit is contained in:
2026-04-10 12:57:03 +02:00
parent 15806a6e04
commit 086d6c601e
24 changed files with 236 additions and 236 deletions

View File

@@ -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() : '',
];
}
}
}