@@ -69,7 +69,7 @@ |
||
| 69 | 69 | )] |
| 70 | 70 | #[ApiResource( |
| 71 | 71 | uriTemplate: '/players/{id}/games', |
| 72 | - operations: [ new GetCollection() ], |
|
| 72 | + operations: [new GetCollection()], |
|
| 73 | 73 | uriVariables: [ |
| 74 | 74 | 'id' => new Link(toProperty: 'player', fromClass: Player::class), |
| 75 | 75 | ], |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | uriVariables: [ |
| 247 | 247 | 'id' => new Link(fromClass: Platform::class, toProperty: 'platforms'), |
| 248 | 248 | ], |
| 249 | - operations: [ new GetCollection() ], |
|
| 249 | + operations: [new GetCollection()], |
|
| 250 | 250 | normalizationContext: ['groups' => ['game:read']], |
| 251 | 251 | )] |
| 252 | 252 | #[ApiResource( |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | uriVariables: [ |
| 255 | 255 | 'id' => new Link(fromClass: Serie::class, toProperty: 'serie'), |
| 256 | 256 | ], |
| 257 | - operations: [ new GetCollection() ], |
|
| 257 | + operations: [new GetCollection()], |
|
| 258 | 258 | normalizationContext: ['groups' => ['game:read', 'game:platforms', 'platform:read']], |
| 259 | 259 | )] |
| 260 | 260 | #[ApiFilter( |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | $this->platforms->removeElement($platform); |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | - public function getPlatforms(): ArrayCollection|Collection |
|
| 556 | + public function getPlatforms(): ArrayCollection | Collection |
|
| 557 | 557 | { |
| 558 | 558 | return $this->platforms; |
| 559 | 559 | } |
@@ -273,7 +273,7 @@ |
||
| 273 | 273 | uriVariables: [ |
| 274 | 274 | 'id' => new Link(fromClass: Team::class, toProperty: 'team'), |
| 275 | 275 | ], |
| 276 | - operations: [ new GetCollection() ], |
|
| 276 | + operations: [new GetCollection()], |
|
| 277 | 277 | normalizationContext: ['groups' => ['player:read:minimal']], |
| 278 | 278 | )] |
| 279 | 279 | #[ApiFilter( |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | )] |
| 37 | 37 | #[ApiResource( |
| 38 | 38 | uriTemplate: '/teams/{id}/games', |
| 39 | - operations: [ new GetCollection() ], |
|
| 39 | + operations: [new GetCollection()], |
|
| 40 | 40 | uriVariables: [ |
| 41 | 41 | 'id' => new Link(toProperty: 'team', fromClass: Team::class), |
| 42 | 42 | ], |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | uriVariables: [ |
| 41 | 41 | 'id' => new Link(fromClass: Player::class, toProperty: 'player'), |
| 42 | 42 | ], |
| 43 | - operations: [ new GetCollection() ], |
|
| 43 | + operations: [new GetCollection()], |
|
| 44 | 44 | normalizationContext: ['groups' => [ |
| 45 | 45 | 'lost-position:read', |
| 46 | 46 | 'lost-position:chart', 'chart:read', |
@@ -14,75 +14,75 @@ |
||
| 14 | 14 | * Based on the data provided: VGR ID => IGDB ID |
| 15 | 15 | */ |
| 16 | 16 | private const VGR_TO_IGDB_MAPPING = [ |
| 17 | - 1 => 21, // GameCube => Nintendo GameCube |
|
| 18 | - 2 => 8, // PlayStation 2 => PlayStation 2 |
|
| 19 | - 3 => 11, // Xbox => Xbox |
|
| 20 | - 4 => 23, // Dreamcast => Dreamcast |
|
| 21 | - 5 => 32, // Saturn => Sega Saturn |
|
| 22 | - 6 => 7, // PlayStation => PlayStation |
|
| 23 | - 7 => 24, // Game Boy Advance => Game Boy Advance |
|
| 24 | - 8 => 19, // Super Nintendo / Super Famicom => Super Nintendo Entertainment System |
|
| 25 | - 9 => 33, // Game Boy / Color => Game Boy |
|
| 26 | - 10 => 20, // Nintendo Dual Screen => Nintendo DS |
|
| 27 | - 11 => 4, // Nintendo 64 => Nintendo 64 |
|
| 28 | - 12 => 80, // Neo Geo => Neo Geo AES |
|
| 29 | - 13 => 6, // PC => PC (Microsoft Windows) |
|
| 30 | - 14 => 12, // Xbox 360 => Xbox 360 |
|
| 31 | - 15 => 5, // Wii => Wii |
|
| 32 | - 16 => 9, // PlayStation 3 => PlayStation 3 |
|
| 33 | - 17 => 18, // Nintendo / Famicom => Nintendo Entertainment System |
|
| 34 | - 18 => 64, // Master System => Sega Master System/Mark III |
|
| 35 | - 19 => 38, // PlayStation Portable => PlayStation Portable |
|
| 36 | - 20 => 29, // Megadrive / Genesis => Sega Mega Drive/Genesis |
|
| 37 | - 21 => 86, // PC-Engine / TurboGrafx => TurboGrafx-16/PC Engine |
|
| 38 | - 22 => 59, // Atari 2600 => Atari 2600 |
|
| 39 | - 24 => 62, // Jaguar => Atari Jaguar |
|
| 40 | - 27 => 68, // Colecovision => ColecoVision |
|
| 41 | - 28 => 16, // Amiga => Amiga |
|
| 17 | + 1 => 21, // GameCube => Nintendo GameCube |
|
| 18 | + 2 => 8, // PlayStation 2 => PlayStation 2 |
|
| 19 | + 3 => 11, // Xbox => Xbox |
|
| 20 | + 4 => 23, // Dreamcast => Dreamcast |
|
| 21 | + 5 => 32, // Saturn => Sega Saturn |
|
| 22 | + 6 => 7, // PlayStation => PlayStation |
|
| 23 | + 7 => 24, // Game Boy Advance => Game Boy Advance |
|
| 24 | + 8 => 19, // Super Nintendo / Super Famicom => Super Nintendo Entertainment System |
|
| 25 | + 9 => 33, // Game Boy / Color => Game Boy |
|
| 26 | + 10 => 20, // Nintendo Dual Screen => Nintendo DS |
|
| 27 | + 11 => 4, // Nintendo 64 => Nintendo 64 |
|
| 28 | + 12 => 80, // Neo Geo => Neo Geo AES |
|
| 29 | + 13 => 6, // PC => PC (Microsoft Windows) |
|
| 30 | + 14 => 12, // Xbox 360 => Xbox 360 |
|
| 31 | + 15 => 5, // Wii => Wii |
|
| 32 | + 16 => 9, // PlayStation 3 => PlayStation 3 |
|
| 33 | + 17 => 18, // Nintendo / Famicom => Nintendo Entertainment System |
|
| 34 | + 18 => 64, // Master System => Sega Master System/Mark III |
|
| 35 | + 19 => 38, // PlayStation Portable => PlayStation Portable |
|
| 36 | + 20 => 29, // Megadrive / Genesis => Sega Mega Drive/Genesis |
|
| 37 | + 21 => 86, // PC-Engine / TurboGrafx => TurboGrafx-16/PC Engine |
|
| 38 | + 22 => 59, // Atari 2600 => Atari 2600 |
|
| 39 | + 24 => 62, // Jaguar => Atari Jaguar |
|
| 40 | + 27 => 68, // Colecovision => ColecoVision |
|
| 41 | + 28 => 16, // Amiga => Amiga |
|
| 42 | 42 | 29 => 307, // Game & Watch => Game & Watch |
| 43 | - 30 => 66, // Atari 5200 => Atari 5200 |
|
| 44 | - 31 => 87, // Virtual Boy => Virtual Boy |
|
| 45 | - 33 => 57, // WonderSwan => WonderSwan |
|
| 46 | - 34 => 15, // Commodore 64 => Commodore C64/128/MAX |
|
| 47 | - 35 => 35, // Game Gear => Sega Game Gear |
|
| 48 | - 36 => 50, // 3DO Interactive Multiplayer => 3DO Interactive Multiplayer |
|
| 49 | - 37 => 27, // MSX => MSX |
|
| 50 | - 38 => 61, // Lynx => Atari Lynx |
|
| 43 | + 30 => 66, // Atari 5200 => Atari 5200 |
|
| 44 | + 31 => 87, // Virtual Boy => Virtual Boy |
|
| 45 | + 33 => 57, // WonderSwan => WonderSwan |
|
| 46 | + 34 => 15, // Commodore 64 => Commodore C64/128/MAX |
|
| 47 | + 35 => 35, // Game Gear => Sega Game Gear |
|
| 48 | + 36 => 50, // 3DO Interactive Multiplayer => 3DO Interactive Multiplayer |
|
| 49 | + 37 => 27, // MSX => MSX |
|
| 50 | + 38 => 61, // Lynx => Atari Lynx |
|
| 51 | 51 | 39 => 120, // Neo Geo Pocket Color => Neo Geo Pocket Color |
| 52 | - 40 => 37, // Nintendo 3DS => Nintendo 3DS |
|
| 53 | - 41 => 39, // iOS => iOS |
|
| 54 | - 42 => 34, // Android => Android |
|
| 55 | - 43 => 74, // Windows Phone => Windows Phone |
|
| 56 | - 44 => 89, // Microvision => Microvision |
|
| 57 | - 45 => 41, // Wii U => Wii U |
|
| 58 | - 46 => 25, // Amstrad CPC6128 => Amstrad CPC |
|
| 59 | - 47 => 46, // PS Vita => PlayStation Vita |
|
| 60 | - 48 => 6, // Windows 8 => PC (Microsoft Windows) |
|
| 61 | - 49 => 48, // PlayStation 4 => PlayStation 4 |
|
| 62 | - 50 => 49, // Xbox One => Xbox One |
|
| 63 | - 51 => 6, // Windows 10 => PC (Microsoft Windows) |
|
| 52 | + 40 => 37, // Nintendo 3DS => Nintendo 3DS |
|
| 53 | + 41 => 39, // iOS => iOS |
|
| 54 | + 42 => 34, // Android => Android |
|
| 55 | + 43 => 74, // Windows Phone => Windows Phone |
|
| 56 | + 44 => 89, // Microvision => Microvision |
|
| 57 | + 45 => 41, // Wii U => Wii U |
|
| 58 | + 46 => 25, // Amstrad CPC6128 => Amstrad CPC |
|
| 59 | + 47 => 46, // PS Vita => PlayStation Vita |
|
| 60 | + 48 => 6, // Windows 8 => PC (Microsoft Windows) |
|
| 61 | + 49 => 48, // PlayStation 4 => PlayStation 4 |
|
| 62 | + 50 => 49, // Xbox One => Xbox One |
|
| 63 | + 51 => 6, // Windows 10 => PC (Microsoft Windows) |
|
| 64 | 64 | 52 => 130, // Switch => Nintendo Switch |
| 65 | - 53 => 26, // ZX spectrum => ZX Spectrum |
|
| 66 | - 54 => 63, // Atari ST => Atari ST/STE |
|
| 65 | + 53 => 26, // ZX spectrum => ZX Spectrum |
|
| 66 | + 54 => 63, // Atari ST => Atari ST/STE |
|
| 67 | 67 | 55 => 121, // Sharp x68000 => Sharp X68000 |
| 68 | - 56 => 53, // MSX2 => MSX2 |
|
| 69 | - 57 => 65, // Atari 400/800/1200/XL/XE => Atari 8-bit |
|
| 70 | - 58 => 29, // Megadrive Classic => Sega Mega Drive/Genesis |
|
| 68 | + 56 => 53, // MSX2 => MSX2 |
|
| 69 | + 57 => 65, // Atari 400/800/1200/XL/XE => Atari 8-bit |
|
| 70 | + 58 => 29, // Megadrive Classic => Sega Mega Drive/Genesis |
|
| 71 | 71 | 59 => null, // Bandai Electronics => No direct IGDB mapping |
| 72 | - 60 => 70, // Vectrex => Vectrex |
|
| 73 | - 61 => 60, // Atari 7800 => Atari 7800 |
|
| 72 | + 60 => 70, // Vectrex => Vectrex |
|
| 73 | + 61 => 60, // Atari 7800 => Atari 7800 |
|
| 74 | 74 | 62 => 169, // Xbox Series => Xbox Series X|S |
| 75 | 75 | 63 => 167, // PlayStation 5 => PlayStation 5 |
| 76 | - 64 => 29, // Megadrive / Genesis Mini => Sega Mega Drive/Genesis |
|
| 77 | - 65 => 19, // Super Nintendo / Super Famicom Mini => Super Nintendo Entertainment System |
|
| 78 | - 66 => 18, // Nintendo / Famicom Mini => Nintendo Entertainment System |
|
| 79 | - 67 => 7, // PlayStation Classic => PlayStation |
|
| 80 | - 68 => 15, // Commodore 64 Mini => Commodore C64/128/MAX |
|
| 81 | - 69 => 80, // Neo Geo Mini => Neo Geo AES |
|
| 82 | - 70 => 80, // Neo Geo Arcade Stick Pro => Neo Geo AES |
|
| 83 | - 71 => 78, // Mega-CD / Sega CD => Sega CD |
|
| 76 | + 64 => 29, // Megadrive / Genesis Mini => Sega Mega Drive/Genesis |
|
| 77 | + 65 => 19, // Super Nintendo / Super Famicom Mini => Super Nintendo Entertainment System |
|
| 78 | + 66 => 18, // Nintendo / Famicom Mini => Nintendo Entertainment System |
|
| 79 | + 67 => 7, // PlayStation Classic => PlayStation |
|
| 80 | + 68 => 15, // Commodore 64 Mini => Commodore C64/128/MAX |
|
| 81 | + 69 => 80, // Neo Geo Mini => Neo Geo AES |
|
| 82 | + 70 => 80, // Neo Geo Arcade Stick Pro => Neo Geo AES |
|
| 83 | + 71 => 78, // Mega-CD / Sega CD => Sega CD |
|
| 84 | 84 | 72 => 309, // Evercade => Evercade |
| 85 | - 73 => 29, // Megadrive/Genesis Mini 2 => Sega Mega Drive/Genesis |
|
| 85 | + 73 => 29, // Megadrive/Genesis Mini 2 => Sega Mega Drive/Genesis |
|
| 86 | 86 | 74 => 126, // TRS-80 => TRS-80 |
| 87 | 87 | 75 => 508, // Switch 2 => Nintendo Switch 2 |
| 88 | 88 | ]; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param int|string $value |
| 30 | 30 | * @return array |
| 31 | 31 | */ |
| 32 | - public static function getValues(string $mask, int|string $value): array |
|
| 32 | + public static function getValues(string $mask, int | string $value): array |
|
| 33 | 33 | { |
| 34 | 34 | $parse = self::parseChartMask($mask); |
| 35 | 35 | $negative = $value !== null && str_starts_with((string) $value, '-'); |
@@ -147,6 +147,6 @@ discard block |
||
| 147 | 147 | $result = $tmpValue . $suffixe . $result; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - return ($negative ? '-' : '') . $result; |
|
| 150 | + return ($negative ? '-' : '') . $result; |
|
| 151 | 151 | } |
| 152 | 152 | } |