SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "Already Tracked Game" 3 t #704

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

SonarQube issue detected.

SonarQube key: 12c4f9b9-3e3f-4772-a9ef-6dec6a28beed
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/NewlyAddedGamesPageTest.php:308
Message: Define a constant instead of duplicating this literal "Already Tracked Game" 3 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=12c4f9b9-3e3f-4772-a9ef-6dec6a28beed&open=12c4f9b9-3e3f-4772-a9ef-6dec6a28beed

SonarQube issue detected. **SonarQube key:** `12c4f9b9-3e3f-4772-a9ef-6dec6a28beed` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/NewlyAddedGamesPageTest.php:308` **Message:** Define a constant instead of duplicating this literal "Already Tracked Game" 3 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=12c4f9b9-3e3f-4772-a9ef-6dec6a28beed&open=12c4f9b9-3e3f-4772-a9ef-6dec6a28beed <!-- sonarqube:issue:12c4f9b9-3e3f-4772-a9ef-6dec6a28beed -->
Codex self-assigned this 2026-06-10 20:05:04 -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:47 -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#704
No description provided.