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

@@ -4,7 +4,7 @@ monolog:
type: stream type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
level: error level: error
channels: ["!event"] channels: [ "!event" ]
# uncomment to get logging in your browser # uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration # you may have to allow bigger header sizes in your Web server configuration
#firephp: #firephp:
@@ -16,4 +16,4 @@ monolog:
console: console:
type: console type: console
process_psr_3_messages: false process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"] channels: [ "!event", "!doctrine", "!console" ]

View File

@@ -4,7 +4,7 @@ monolog:
type: fingers_crossed type: fingers_crossed
action_level: error action_level: error
handler: nested handler: nested
excluded_http_codes: [404, 405] excluded_http_codes: [ 404, 405 ]
nested: nested:
type: stream type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
@@ -12,7 +12,7 @@ monolog:
console: console:
type: console type: console
process_psr_3_messages: false process_psr_3_messages: false
channels: ["!event", "!doctrine"] channels: [ "!event", "!doctrine" ]
deprecation: deprecation:
type: stream type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
@@ -20,4 +20,4 @@ monolog:
type: filter type: filter
handler: deprecation handler: deprecation
max_level: info max_level: info
channels: ["php"] channels: [ "php" ]

View File

@@ -1,4 +1,4 @@
#webpack_encore: #webpack_encore:
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Available in version 1.2 # Available in version 1.2
#cache: true #cache: true

View File

@@ -4,4 +4,4 @@ monolog:
type: stream type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug level: debug
channels: ["!event"] channels: [ "!event" ]

View File

@@ -1,5 +1,5 @@
twig: twig:
paths: ['%kernel.project_dir%/templates'] paths: [ '%kernel.project_dir%/templates' ]
debug: '%kernel.debug%' debug: '%kernel.debug%'
strict_variables: '%kernel.debug%' strict_variables: '%kernel.debug%'
globals: globals:

View File

@@ -183,7 +183,7 @@ class RpcManager implements RpcManagerInterface
'red' => null !== $playedGame->getRed() ? $playedGame->getRed()->getUsername() : '', 'red' => null !== $playedGame->getRed() ? $playedGame->getRed()->getUsername() : '',
'blue' => null !== $playedGame->getBlue() ? $playedGame->getBlue()->getUsername() : '', 'blue' => null !== $playedGame->getBlue() ? $playedGame->getBlue()->getUsername() : '',
'redAnon' => null !== $playedGame->getRedAnon() ? $playedGame->getRedAnon()->getUserName() : '', 'redAnon' => null !== $playedGame->getRedAnon() ? $playedGame->getRedAnon()->getUserName() : '',
'blueAnon' => null !== $playedGame->getBlueAnon()? $playedGame->getBlueAnon()->getUserName(): '', 'blueAnon' => null !== $playedGame->getBlueAnon() ? $playedGame->getBlueAnon()->getUserName() : '',
]; ];
} }
} }

View File

@@ -19,9 +19,9 @@ use App\Interfaces\TopicManagerInterface;
use DateTime; use DateTime;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Exception; use Exception;
use RuntimeException;
use JsonException; use JsonException;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use RuntimeException;
use Symfony\Component\Mercure\HubInterface; use Symfony\Component\Mercure\HubInterface;
use Symfony\Component\Mercure\Update; use Symfony\Component\Mercure\Update;
use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserInterface;
@@ -134,7 +134,7 @@ class TopicManager implements TopicManagerInterface
// ------------------------------------------------------------------ // // ------------------------------------------------------------------ //
$coords = $event['coords']; $coords = $event['coords'];
$player = $event['player']; // 'red' | 'blue' $player = $event['player']; // 'red' | 'blue'
$isBomb = (bool) $event['bomb']; $isBomb = (bool)$event['bomb'];
$playedGame = $this->getPlayedGame($gameAssoc); $playedGame = $this->getPlayedGame($gameAssoc);
$grid = $this->loadGrid($gameAssoc); $grid = $this->loadGrid($gameAssoc);
@@ -290,12 +290,12 @@ class TopicManager implements TopicManagerInterface
} }
return [ return [
[$row, $col ], [$row - 2, $col - 2], [$row - 2, $col ], [$row - 2, $col + 2], [$row, $col], [$row - 2, $col - 2], [$row - 2, $col], [$row - 2, $col + 2],
[$row, $col - 2], [$row, $col + 2], [$row + 2, $col - 2], [$row + 2, $col ], [$row, $col - 2], [$row, $col + 2], [$row + 2, $col - 2], [$row + 2, $col],
[$row + 2, $col + 2], [$row - 2, $col + 1], [$row - 2, $col - 1], [$row + 2, $col + 2], [$row - 2, $col + 1], [$row - 2, $col - 1],
[$row - 1, $col - 2], [$row - 1, $col - 1], [$row - 1, $col ], [$row - 1, $col + 1], [$row - 1, $col + 2], [$row - 1, $col - 2], [$row - 1, $col - 1], [$row - 1, $col], [$row - 1, $col + 1], [$row - 1, $col + 2],
[$row, $col - 1], [$row, $col + 1], [$row, $col - 1], [$row, $col + 1],
[$row + 1, $col - 2], [$row + 1, $col - 1], [$row + 1, $col ], [$row + 1, $col + 1], [$row + 1, $col + 2], [$row + 1, $col - 2], [$row + 1, $col - 1], [$row + 1, $col], [$row + 1, $col + 1], [$row + 1, $col + 2],
[$row + 2, $col - 1], [$row + 2, $col + 1], [$row + 2, $col - 1], [$row + 2, $col + 1],
]; ];
} }
@@ -404,7 +404,7 @@ class TopicManager implements TopicManagerInterface
$step = new Step(); $step = new Step();
$step->setRow($event['coords'][0]); $step->setRow($event['coords'][0]);
$step->setCol($event['coords'][1]); $step->setCol($event['coords'][1]);
$step->setWBomb((bool) $event['bomb']); $step->setWBomb((bool)$event['bomb']);
$step->setPlayer($player); $step->setPlayer($player);
$step->setRevealedCells($revealedCells); $step->setRevealedCells($revealedCells);
$step->setPlayedGame($playedGame); $step->setPlayedGame($playedGame);
@@ -413,8 +413,8 @@ class TopicManager implements TopicManagerInterface
$playedGame->setRedPoints($redPoints); $playedGame->setRedPoints($redPoints);
$playedGame->setBluePoints($bluePoints); $playedGame->setBluePoints($bluePoints);
$playedGame->setRedExplodedBomb((bool) $event['bomb'] && 'red' === $player ? true : null); $playedGame->setRedExplodedBomb((bool)$event['bomb'] && 'red' === $player ? true : null);
$playedGame->setBlueExplodedBomb((bool) $event['bomb'] && 'blue' === $player ? true : null); $playedGame->setBlueExplodedBomb((bool)$event['bomb'] && 'blue' === $player ? true : null);
$playedGame->setUpdated(new DateTime()); $playedGame->setUpdated(new DateTime());
$this->entityManager->persist($playedGame); $this->entityManager->persist($playedGame);