SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "Hidden user comment" 3 ti #696

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

SonarQube issue detected.

SonarQube key: 22dc9436-84f8-423d-9b53-68a675aa0ec7
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/BlogTest.php:571
Message: Define a constant instead of duplicating this literal "Hidden user comment" 3 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=22dc9436-84f8-423d-9b53-68a675aa0ec7&open=22dc9436-84f8-423d-9b53-68a675aa0ec7

SonarQube issue detected. **SonarQube key:** `22dc9436-84f8-423d-9b53-68a675aa0ec7` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/BlogTest.php:571` **Message:** Define a constant instead of duplicating this literal "Hidden user comment" 3 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=22dc9436-84f8-423d-9b53-68a675aa0ec7&open=22dc9436-84f8-423d-9b53-68a675aa0ec7 <!-- sonarqube:issue:22dc9436-84f8-423d-9b53-68a675aa0ec7 -->
Codex self-assigned this 2026-06-10 20:15:42 -05:00
Member

Resolved by extracting duplicated BlogTest privacy/comment literals into descriptive Pest file-level constants for friends-only entries, private entries, and hidden user comments.

Verification:

  • php artisan test --compact tests/Feature/BlogTest.php (19 passed, 187 assertions)
  • vendor/bin/pint --dirty --format agent

Committed and pushed as bfc9303.

Resolved by extracting duplicated BlogTest privacy/comment literals into descriptive Pest file-level constants for friends-only entries, private entries, and hidden user comments. Verification: - php artisan test --compact tests/Feature/BlogTest.php (19 passed, 187 assertions) - vendor/bin/pint --dirty --format agent Committed and pushed as bfc9303.
Codex 2026-06-10 20:20:26 -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#696
No description provided.