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

Closed
opened 2026-06-12 09:32:42 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: 9d142536-9cc8-46fd-9959-0ab0d71743b0
Severity: MAJOR
Type: CODE_SMELL
Location: myvideogamelist:app/Console/Commands/Concerns/SyncsProdTables.php:89
Message: This function has 9 parameters, which is greater than the 7 authorized.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=9d142536-9cc8-46fd-9959-0ab0d71743b0&open=9d142536-9cc8-46fd-9959-0ab0d71743b0

SonarQube issue detected. **SonarQube key:** `9d142536-9cc8-46fd-9959-0ab0d71743b0` **Severity:** `MAJOR` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:app/Console/Commands/Concerns/SyncsProdTables.php:89` **Message:** This function has 9 parameters, which is greater than the 7 authorized. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=9d142536-9cc8-46fd-9959-0ab0d71743b0&open=9d142536-9cc8-46fd-9959-0ab0d71743b0 <!-- sonarqube:issue:9d142536-9cc8-46fd-9959-0ab0d71743b0 -->
Codex self-assigned this 2026-06-12 09:52:00 -05:00
Member

Fixed

  • Reduced syncTableFromProduction(), SyncProdProfileComments::handle(), and SyncProdUserSiteSettings::handle() to a single final exit-code return.
  • Replaced the 9-parameter shared sync writer with an options array.
  • Extracted the friend-add JSON status code before the response ternary to remove the nested ternary.

Commit: c81ca49

Verification

vendor/bin/pint --format agent app/Console/Commands/Concerns/SyncsProdTables.php app/Console/Commands/SyncProdProfileComments.php app/Console/Commands/SyncProdUserSiteSettings.php app/Http/Controllers/UserFriendController.php
git diff --check
php artisan test --compact tests/Feature/SyncProdProfileCommentsCommandTest.php tests/Feature/SyncProdUserSiteSettingsCommandTest.php tests/Feature/SyncProdRolesCommandTest.php tests/Feature/SyncDevOgFavoritesCommandTest.php tests/Feature/UserFriendTest.php

Result: 26 passed, 195 assertions.

## Fixed - Reduced `syncTableFromProduction()`, `SyncProdProfileComments::handle()`, and `SyncProdUserSiteSettings::handle()` to a single final exit-code return. - Replaced the 9-parameter shared sync writer with an options array. - Extracted the friend-add JSON status code before the response ternary to remove the nested ternary. Commit: `c81ca49` ## Verification ```bash vendor/bin/pint --format agent app/Console/Commands/Concerns/SyncsProdTables.php app/Console/Commands/SyncProdProfileComments.php app/Console/Commands/SyncProdUserSiteSettings.php app/Http/Controllers/UserFriendController.php git diff --check php artisan test --compact tests/Feature/SyncProdProfileCommentsCommandTest.php tests/Feature/SyncProdUserSiteSettingsCommandTest.php tests/Feature/SyncProdRolesCommandTest.php tests/Feature/SyncDevOgFavoritesCommandTest.php tests/Feature/UserFriendTest.php ``` Result: `26 passed, 195 assertions`.
Codex 2026-06-12 09:58:35 -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#744
No description provided.