SonarQube MAJOR CODE_SMELL: This function has 8 parameters, which is greater than the 7 authorized. #759

Closed
opened 2026-06-15 22:08:54 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: 5ec15c37-37c1-4f44-a4d0-ece025b3c602
Severity: MAJOR
Type: CODE_SMELL
Location: myvideogamelist:app/Support/FavoriteWishlistControllerSupport.php:27
Message: This function has 8 parameters, which is greater than the 7 authorized.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=5ec15c37-37c1-4f44-a4d0-ece025b3c602&open=5ec15c37-37c1-4f44-a4d0-ece025b3c602

SonarQube issue detected. **SonarQube key:** `5ec15c37-37c1-4f44-a4d0-ece025b3c602` **Severity:** `MAJOR` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:app/Support/FavoriteWishlistControllerSupport.php:27` **Message:** This function has 8 parameters, which is greater than the 7 authorized. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=5ec15c37-37c1-4f44-a4d0-ece025b3c602&open=5ec15c37-37c1-4f44-a4d0-ece025b3c602 <!-- sonarqube:issue:5ec15c37-37c1-4f44-a4d0-ece025b3c602 -->
Codex self-assigned this 2026-06-15 22:12:54 -05:00
Member

Resolved in 63b0d75.

Changes:

  • Added ADMIN_GAME_CLEANUP_SAVE_CHANGES_LABEL for the duplicated Save Changes test literal.
  • Reworked the MySQL connection config helper to accept one shaped connection array instead of 11 scalar parameters.
  • Reworked favorite/wishlist store and destroy support helpers to accept one shaped action array instead of long parameter lists.
  • Updated favorite and wishlist controller call sites to pass the new action arrays.

Verification:

  • vendor/bin/pint --format agent app/Http/Controllers/FavoriteController.php app/Http/Controllers/WishlistController.php app/Support/FavoriteWishlistControllerSupport.php config/database.php tests/Feature/AdminGameCleanupTest.php
  • php artisan test --compact tests/Feature/FavoriteTest.php tests/Feature/WishlistTest.php tests/Feature/AdminGameCleanupTest.php (60 passed, 449 assertions)
  • composer run stan (no errors)
Resolved in `63b0d75`. Changes: - Added `ADMIN_GAME_CLEANUP_SAVE_CHANGES_LABEL` for the duplicated `Save Changes` test literal. - Reworked the MySQL connection config helper to accept one shaped connection array instead of 11 scalar parameters. - Reworked favorite/wishlist store and destroy support helpers to accept one shaped action array instead of long parameter lists. - Updated favorite and wishlist controller call sites to pass the new action arrays. Verification: - `vendor/bin/pint --format agent app/Http/Controllers/FavoriteController.php app/Http/Controllers/WishlistController.php app/Support/FavoriteWishlistControllerSupport.php config/database.php tests/Feature/AdminGameCleanupTest.php` - `php artisan test --compact tests/Feature/FavoriteTest.php tests/Feature/WishlistTest.php tests/Feature/AdminGameCleanupTest.php` (60 passed, 449 assertions) - `composer run stan` (no errors)
Codex 2026-06-15 22:17:42 -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#759
No description provided.