SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "AAA Text Fallback" 4 time #341

Closed
opened 2026-05-29 12:51:25 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: d25a16b1-d80b-42df-abfa-de0b04f4fa48
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/UserProfileTest.php:191
Message: Define a constant instead of duplicating this literal "AAA Text Fallback" 4 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=d25a16b1-d80b-42df-abfa-de0b04f4fa48&open=d25a16b1-d80b-42df-abfa-de0b04f4fa48

SonarQube issue detected. **SonarQube key:** `d25a16b1-d80b-42df-abfa-de0b04f4fa48` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/UserProfileTest.php:191` **Message:** Define a constant instead of duplicating this literal "AAA Text Fallback" 4 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=d25a16b1-d80b-42df-abfa-de0b04f4fa48&open=d25a16b1-d80b-42df-abfa-de0b04f4fa48 <!-- sonarqube:issue:d25a16b1-d80b-42df-abfa-de0b04f4fa48 -->
jimmyb self-assigned this 2026-06-01 22:30:11 -05:00
Member

Fixed in fdab4a0. Added a CONSOLE_TEXT_FALLBACK_NAME constant in tests/Feature/UserProfileTest.php and reused it for the console fallback fixture plus related assertions, removing the duplicated "AAA Text Fallback" literal flagged by SonarQube. Verified with vendor/bin/pint --dirty --format agent and php artisan test --compact tests/Feature/UserProfileTest.php (23 passed, 153 assertions).

Fixed in fdab4a0. Added a CONSOLE_TEXT_FALLBACK_NAME constant in tests/Feature/UserProfileTest.php and reused it for the console fallback fixture plus related assertions, removing the duplicated "AAA Text Fallback" literal flagged by SonarQube. Verified with vendor/bin/pint --dirty --format agent and php artisan test --compact tests/Feature/UserProfileTest.php (23 passed, 153 assertions).
Codex closed this issue 2026-06-01 22:33:46 -05:00
Sign in to join this conversation.
No milestone
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#341
No description provided.