SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "value="" 8 times. #725

Closed
opened 2026-06-11 17:30:28 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: a68de937-4e0a-4f4d-8eea-ef80334e6849
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/AdminGameIgdbCreateTest.php:725
Message: Define a constant instead of duplicating this literal "value="" 8 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=a68de937-4e0a-4f4d-8eea-ef80334e6849&open=a68de937-4e0a-4f4d-8eea-ef80334e6849

SonarQube issue detected. **SonarQube key:** `a68de937-4e0a-4f4d-8eea-ef80334e6849` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/AdminGameIgdbCreateTest.php:725` **Message:** Define a constant instead of duplicating this literal "value="" 8 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=a68de937-4e0a-4f4d-8eea-ef80334e6849&open=a68de937-4e0a-4f4d-8eea-ef80334e6849 <!-- sonarqube:issue:a68de937-4e0a-4f4d-8eea-ef80334e6849 -->
Codex self-assigned this 2026-06-11 23:04:08 -05:00
Member

Resolved in commit b65ece2.

What changed

  • Added local test constants for repeated rendered value=" snippets in the admin game regional ordering and IGDB create tests.
  • Added a local Fider users endpoint constant in the registration test.
  • Added a local search alias constant in the game search test.
  • Added a local rendered href=" prefix constant in the blog mention tests.
  • Replaced the matching duplicated literals in test files only.

Verification

vendor/bin/pint --dirty --format agent
php artisan test --compact tests/Feature/AdminGameRegionalOrderingTest.php tests/Feature/AdminGameIgdbCreateTest.php tests/Feature/Auth/RegistrationTest.php tests/Feature/GameSearchTest.php tests/Feature/BlogTest.php
git diff --check

All checks passed. The focused test run completed with 70 passing tests and 544 assertions.

Resolved in commit `b65ece2`. ## What changed - Added local test constants for repeated rendered `value="` snippets in the admin game regional ordering and IGDB create tests. - Added a local Fider users endpoint constant in the registration test. - Added a local search alias constant in the game search test. - Added a local rendered `href="` prefix constant in the blog mention tests. - Replaced the matching duplicated literals in test files only. ## Verification ```bash vendor/bin/pint --dirty --format agent php artisan test --compact tests/Feature/AdminGameRegionalOrderingTest.php tests/Feature/AdminGameIgdbCreateTest.php tests/Feature/Auth/RegistrationTest.php tests/Feature/GameSearchTest.php tests/Feature/BlogTest.php git diff --check ``` All checks passed. The focused test run completed with 70 passing tests and 544 assertions.
Codex 2026-06-11 23:11:54 -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#725
No description provided.