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

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

SonarQube issue detected.

SonarQube key: 09244af2-1508-4006-abae-5d01347d8522
Severity: MAJOR
Type: CODE_SMELL
Location: myvideogamelist:app/Support/FavoriteWishlistControllerSupport.php:73
Message: This function has 8 parameters, which is greater than the 7 authorized.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=09244af2-1508-4006-abae-5d01347d8522&open=09244af2-1508-4006-abae-5d01347d8522

SonarQube issue detected. **SonarQube key:** `09244af2-1508-4006-abae-5d01347d8522` **Severity:** `MAJOR` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:app/Support/FavoriteWishlistControllerSupport.php:73` **Message:** This function has 8 parameters, which is greater than the 7 authorized. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=09244af2-1508-4006-abae-5d01347d8522&open=09244af2-1508-4006-abae-5d01347d8522 <!-- sonarqube:issue:09244af2-1508-4006-abae-5d01347d8522 -->
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:39 -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#760
No description provided.