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

View File

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

View File

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

View File

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

View File

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

View File

@@ -183,7 +183,7 @@ class RpcManager implements RpcManagerInterface
'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() : '',
];
}
}

View File

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