@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function findByTeamAndType( |
| 34 | 34 | Team $team, |
| 35 | - string|array $badgeType, |
|
| 35 | + string | array $badgeType, |
|
| 36 | 36 | array $orderBy = [], |
| 37 | 37 | bool $onlyActive = true |
| 38 | 38 | ): array { |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * @param Request $request |
| 90 | 90 | * @return RedirectResponse|Response |
| 91 | 91 | */ |
| 92 | - public function setVideoProofOnlyAction(int $id, Request $request): RedirectResponse|Response |
|
| 92 | + public function setVideoProofOnlyAction(int $id, Request $request): RedirectResponse | Response |
|
| 93 | 93 | { |
| 94 | 94 | /** @var Game $game */ |
| 95 | 95 | $game = $this->admin->getSubject(); |
@@ -225,8 +225,7 @@ |
||
| 225 | 225 | { |
| 226 | 226 | $status = $proof->getStatus()->getValue(); |
| 227 | 227 | $playerName = $proof->getPlayerChart() ? |
| 228 | - $proof->getPlayerChart()->getPlayer()->getPseudo() : |
|
| 229 | - $this->trans('proof.unknown.player', [], 'VgrCoreAdmin'); |
|
| 228 | + $proof->getPlayerChart()->getPlayer()->getPseudo() : $this->trans('proof.unknown.player', [], 'VgrCoreAdmin'); |
|
| 230 | 229 | |
| 231 | 230 | switch ($status) { |
| 232 | 231 | case ProofStatus::ACCEPTED: |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | ->join('c.group', 'g') |
| 41 | 41 | ->join('g.game', 'game') |
| 42 | 42 | ->andWhere('game.id = :idGame') |
| 43 | - ->setParameter('idGame', (int)$idGame); |
|
| 43 | + ->setParameter('idGame', (int) $idGame); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | return $qb->getQuery()->getResult(); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $gameStats = $gameRepository->getStats(); |
| 37 | 37 | |
| 38 | 38 | return array( |
| 39 | - 'nbPlayer' => (int)$playerStats[1], |
|
| 39 | + 'nbPlayer' => (int) $playerStats[1], |
|
| 40 | 40 | 'nbChart' => (int) $playerStats[2], |
| 41 | 41 | 'nbChartProven' => (int) $playerStats[3], |
| 42 | 42 | 'nbGame' => (int) $gameStats[1], |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | // Utiliser le cache pour éviter de recalculer la requête |
| 56 | 56 | $cacheKey = "latest_scores_different_games_{$limit}"; |
| 57 | 57 | |
| 58 | - return $this->cache->get($cacheKey, function (ItemInterface $item) use ($limit) { |
|
| 58 | + return $this->cache->get($cacheKey, function(ItemInterface $item) use ($limit) { |
|
| 59 | 59 | // Cache pendant 5 minutes (300 secondes) |
| 60 | 60 | $item->expiresAfter(300); |
| 61 | 61 | |
@@ -172,9 +172,9 @@ |
||
| 172 | 172 | private function getPeriodInfo(string $period, ?int $year, ?int $month, ?int $week): string |
| 173 | 173 | { |
| 174 | 174 | return match ($period) { |
| 175 | - 'week' => $year && $week ? "Week {$week}/{$year}" : 'Current Week', |
|
| 176 | - 'month' => $year && $month ? "Month {$month}/{$year}" : 'Current Month', |
|
| 177 | - 'year' => $year ? "Year {$year}" : 'Current Year', |
|
| 175 | + 'week' => $year && $week ? "week {$week}/{$year}" : 'Current Week', |
|
| 176 | + 'month' => $year && $month ? "month {$month}/{$year}" : 'Current Month', |
|
| 177 | + 'year' => $year ? "year {$year}" : 'Current Year', |
|
| 178 | 178 | default => 'Unknown Period' |
| 179 | 179 | }; |
| 180 | 180 | } |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | uriVariables: [ |
| 44 | 44 | 'id' => new Link(fromClass: Player::class, toProperty: 'player'), |
| 45 | 45 | ], |
| 46 | - operations: [ new GetCollection() ], |
|
| 46 | + operations: [new GetCollection()], |
|
| 47 | 47 | normalizationContext: ['groups' => [ |
| 48 | - 'team-request:read', 'team-request:team', 'team:read:minimal',] |
|
| 48 | + 'team-request:read', 'team-request:team', 'team:read:minimal', ] |
|
| 49 | 49 | ], |
| 50 | 50 | )] |
| 51 | 51 | #[ApiResource( |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | uriVariables: [ |
| 54 | 54 | 'id' => new Link(fromClass: Team::class, toProperty: 'team'), |
| 55 | 55 | ], |
| 56 | - operations: [ new GetCollection() ], |
|
| 56 | + operations: [new GetCollection()], |
|
| 57 | 57 | normalizationContext: ['groups' => [ |
| 58 | - 'team-request:read', 'team-request:player', 'player:read:minimal',] |
|
| 58 | + 'team-request:read', 'team-request:player', 'player:read:minimal', ] |
|
| 59 | 59 | ], |
| 60 | 60 | )] |
| 61 | 61 | #[ApiFilter( |
@@ -363,14 +363,14 @@ |
||
| 363 | 363 | paginationEnabled: false, |
| 364 | 364 | normalizationContext: ['groups' => |
| 365 | 365 | [ 'player-chart:read', |
| 366 | - 'player-chart:libs', 'player-chart-lib:read', |
|
| 367 | - 'player-chart:status', 'player-chart-status:read', |
|
| 368 | - 'player-chart:chart', 'chart:read', |
|
| 369 | - 'chart:group', 'group:read:minimal', |
|
| 370 | - 'group:game', 'game:read:minimal', |
|
| 371 | - 'player-chart:proof', 'proof:read', |
|
| 372 | - 'proof:picture', 'picture:read', |
|
| 373 | - 'proof:video', 'video:read',] |
|
| 366 | + 'player-chart:libs', 'player-chart-lib:read', |
|
| 367 | + 'player-chart:status', 'player-chart-status:read', |
|
| 368 | + 'player-chart:chart', 'chart:read', |
|
| 369 | + 'chart:group', 'group:read:minimal', |
|
| 370 | + 'group:game', 'game:read:minimal', |
|
| 371 | + 'player-chart:proof', 'proof:read', |
|
| 372 | + 'proof:picture', 'picture:read', |
|
| 373 | + 'proof:video', 'video:read',] |
|
| 374 | 374 | ], |
| 375 | 375 | order: ['chart.id' => 'ASC'], |
| 376 | 376 | )] |
@@ -356,13 +356,13 @@ discard block |
||
| 356 | 356 | #[ApiFilter(ExistsFilter::class, properties: ['proof', 'proof.picture', 'proof.video'])] |
| 357 | 357 | #[ApiResource( |
| 358 | 358 | uriTemplate: '/players/{id}/charts', |
| 359 | - operations: [ new GetCollection() ], |
|
| 359 | + operations: [new GetCollection()], |
|
| 360 | 360 | uriVariables: [ |
| 361 | 361 | 'id' => new Link(toProperty: 'player', fromClass: Player::class), |
| 362 | 362 | ], |
| 363 | 363 | paginationEnabled: false, |
| 364 | 364 | normalizationContext: ['groups' => |
| 365 | - [ 'player-chart:read', |
|
| 365 | + ['player-chart:read', |
|
| 366 | 366 | 'player-chart:libs', 'player-chart-lib:read', |
| 367 | 367 | 'player-chart:status', 'player-chart-status:read', |
| 368 | 368 | 'player-chart:chart', 'chart:read', |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | 'group:game', 'game:read:minimal', |
| 371 | 371 | 'player-chart:proof', 'proof:read', |
| 372 | 372 | 'proof:picture', 'picture:read', |
| 373 | - 'proof:video', 'video:read',] |
|
| 373 | + 'proof:video', 'video:read', ] |
|
| 374 | 374 | ], |
| 375 | 375 | order: ['chart.id' => 'ASC'], |
| 376 | 376 | )] |