SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "Available Action Game" 3 #703

Closed
opened 2026-06-10 19:33:13 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: 71cd1a93-6b4a-4d7d-85ec-930798ea1148
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/NewlyAddedGamesPageTest.php:298
Message: Define a constant instead of duplicating this literal "Available Action Game" 3 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=71cd1a93-6b4a-4d7d-85ec-930798ea1148&open=71cd1a93-6b4a-4d7d-85ec-930798ea1148

SonarQube issue detected. **SonarQube key:** `71cd1a93-6b4a-4d7d-85ec-930798ea1148` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/NewlyAddedGamesPageTest.php:298` **Message:** Define a constant instead of duplicating this literal "Available Action Game" 3 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=71cd1a93-6b4a-4d7d-85ec-930798ea1148&open=71cd1a93-6b4a-4d7d-85ec-930798ea1148 <!-- sonarqube:issue:71cd1a93-6b4a-4d7d-85ec-930798ea1148 -->
Codex self-assigned this 2026-06-10 20:05:03 -05:00
Member

Resolved by extracting duplicated NewlyAddedGamesPageTest action-card game names into descriptive Pest file-level constants for the available action game and already tracked game.

Verification:

  • php artisan test --compact tests/Feature/NewlyAddedGamesPageTest.php (7 passed, 57 assertions)
  • vendor/bin/pint --dirty --format agent

Committed and pushed as 75e52f3.

Resolved by extracting duplicated NewlyAddedGamesPageTest action-card game names into descriptive Pest file-level constants for the available action game and already tracked game. Verification: - php artisan test --compact tests/Feature/NewlyAddedGamesPageTest.php (7 passed, 57 assertions) - vendor/bin/pint --dirty --format agent Committed and pushed as 75e52f3.
Codex 2026-06-10 20:10:46 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#703
No description provided.