SonarQube MINOR CODE_SMELL: Immediately return this expression instead of assigning it to the temporary vari #755

Closed
opened 2026-06-15 11:36:19 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: 1ab5f1be-c2d5-4823-a1ee-7bd877abd34f
Severity: MINOR
Type: CODE_SMELL
Location: myvideogamelist:app/Http/Controllers/Admin/UserController.php:119
Message: Immediately return this expression instead of assigning it to the temporary variable "$response".

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=1ab5f1be-c2d5-4823-a1ee-7bd877abd34f&open=1ab5f1be-c2d5-4823-a1ee-7bd877abd34f

SonarQube issue detected. **SonarQube key:** `1ab5f1be-c2d5-4823-a1ee-7bd877abd34f` **Severity:** `MINOR` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:app/Http/Controllers/Admin/UserController.php:119` **Message:** Immediately return this expression instead of assigning it to the temporary variable "$response". https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=1ab5f1be-c2d5-4823-a1ee-7bd877abd34f&open=1ab5f1be-c2d5-4823-a1ee-7bd877abd34f <!-- sonarqube:issue:1ab5f1be-c2d5-4823-a1ee-7bd877abd34f -->
Codex self-assigned this 2026-06-15 18:40:31 -05:00
Member

Resolved in e0ea9f5.

Changes:

  • Returned the Admin\UserController::update() action match expression directly instead of assigning it to $response first.

Verification:

  • vendor/bin/pint --format agent app/Http/Controllers/Admin/UserController.php
  • php artisan test --compact tests/Feature/AdminUserProfileInfoTest.php tests/Feature/FiderUserStatusSyncTest.php (23 passed, 100 assertions)
  • composer run stan (no errors)
Resolved in `e0ea9f5`. Changes: - Returned the `Admin\UserController::update()` action `match` expression directly instead of assigning it to `$response` first. Verification: - `vendor/bin/pint --format agent app/Http/Controllers/Admin/UserController.php` - `php artisan test --compact tests/Feature/AdminUserProfileInfoTest.php tests/Feature/FiderUserStatusSyncTest.php` (23 passed, 100 assertions) - `composer run stan` (no errors)
Codex closed this issue 2026-06-15 18:44: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#755
No description provided.