SonarQube MAJOR CODE_SMELL: Class "UserController" has 21 methods, which is greater than 20 authorized. Spli #752

Closed
opened 2026-06-13 00:05:59 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: 50d04e58-7460-4918-abd9-15adfb3a79c7
Severity: MAJOR
Type: CODE_SMELL
Location: myvideogamelist:app/Http/Controllers/Admin/UserController.php:22
Message: Class "UserController" has 21 methods, which is greater than 20 authorized. Split it into smaller classes.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=50d04e58-7460-4918-abd9-15adfb3a79c7&open=50d04e58-7460-4918-abd9-15adfb3a79c7

SonarQube issue detected. **SonarQube key:** `50d04e58-7460-4918-abd9-15adfb3a79c7` **Severity:** `MAJOR` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:app/Http/Controllers/Admin/UserController.php:22` **Message:** Class "UserController" has 21 methods, which is greater than 20 authorized. Split it into smaller classes. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=50d04e58-7460-4918-abd9-15adfb3a79c7&open=50d04e58-7460-4918-abd9-15adfb3a79c7 <!-- sonarqube:issue:50d04e58-7460-4918-abd9-15adfb3a79c7 -->
Codex self-assigned this 2026-06-15 10:29:20 -05:00
Member

Resolved in 2af0f53.

Changes:

  • Moved admin user media upload/reset/url helpers into App\Http\Controllers\Admin\Concerns\ManagesUserMedia, bringing Admin\UserController below the SonarQube method-count threshold.
  • Refactored Admin\UserController::update() to use a single final response return.
  • Used the validation $attribute parameter in the role-assignment failure message.

Verification:

  • vendor/bin/pint --format agent app/Http/Controllers/Admin/UserController.php app/Http/Controllers/Admin/Concerns/ManagesUserMedia.php
  • php artisan test --compact tests/Feature/AdminUserProfileInfoTest.php tests/Feature/FiderUserStatusSyncTest.php (23 passed, 100 assertions)
  • composer run stan (no errors)
Resolved in `2af0f53`. Changes: - Moved admin user media upload/reset/url helpers into `App\Http\Controllers\Admin\Concerns\ManagesUserMedia`, bringing `Admin\UserController` below the SonarQube method-count threshold. - Refactored `Admin\UserController::update()` to use a single final response return. - Used the validation `$attribute` parameter in the role-assignment failure message. Verification: - `vendor/bin/pint --format agent app/Http/Controllers/Admin/UserController.php app/Http/Controllers/Admin/Concerns/ManagesUserMedia.php` - `php artisan test --compact tests/Feature/AdminUserProfileInfoTest.php tests/Feature/FiderUserStatusSyncTest.php` (23 passed, 100 assertions) - `composer run stan` (no errors)
Codex 2026-06-15 10:39:36 -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#752
No description provided.