SonarQube MAJOR CODE_SMELL: This method has 4 returns, which is more than the 3 allowed. #761

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

SonarQube issue detected.

SonarQube key: 53ea6cf2-9716-4b4e-ab92-a3e3e378b79a
Severity: MAJOR
Type: CODE_SMELL
Location: myvideogamelist:app/Support/UpcomingPopularGames.php:142
Message: This method has 4 returns, which is more than the 3 allowed.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=53ea6cf2-9716-4b4e-ab92-a3e3e378b79a&open=53ea6cf2-9716-4b4e-ab92-a3e3e378b79a

SonarQube issue detected. **SonarQube key:** `53ea6cf2-9716-4b4e-ab92-a3e3e378b79a` **Severity:** `MAJOR` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:app/Support/UpcomingPopularGames.php:142` **Message:** This method has 4 returns, which is more than the 3 allowed. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=53ea6cf2-9716-4b4e-ab92-a3e3e378b79a&open=53ea6cf2-9716-4b4e-ab92-a3e3e378b79a <!-- sonarqube:issue:53ea6cf2-9716-4b4e-ab92-a3e3e378b79a -->
Codex self-assigned this 2026-06-19 12:12:22 -05:00
Codex 2026-06-19 12:12:22 -05:00
Member

Resolved in 3589b55.

Changes:

  • Refactored UpcomingPopularGames::eligibleReleaseLabel() to use one final return value.
  • Added UPCOMING_POPULAR_YEAR_ONLY_GAME for the repeated year-only upcoming game test fixture name.

Verification:

  • vendor/bin/pint --format agent app/Support/UpcomingPopularGames.php tests/Feature/MostPopularUpcomingGamesCardTest.php
  • php artisan test --compact tests/Feature/MostPopularUpcomingGamesCardTest.php (6 passed, 52 assertions)
  • composer run stan (no errors)
Resolved in `3589b55`. Changes: - Refactored `UpcomingPopularGames::eligibleReleaseLabel()` to use one final return value. - Added `UPCOMING_POPULAR_YEAR_ONLY_GAME` for the repeated year-only upcoming game test fixture name. Verification: - `vendor/bin/pint --format agent app/Support/UpcomingPopularGames.php tests/Feature/MostPopularUpcomingGamesCardTest.php` - `php artisan test --compact tests/Feature/MostPopularUpcomingGamesCardTest.php` (6 passed, 52 assertions) - `composer run stan` (no errors)
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#761
No description provided.