Skip to content

更新差分へのレート差分表示 #946 でDRYに違反していた箇所の修正#1044

Merged
slime-hatena merged 2 commits intodevelopfrom
refactor/extract-lamp-for-rating
Mar 14, 2026
Merged

更新差分へのレート差分表示 #946 でDRYに違反していた箇所の修正#1044
slime-hatena merged 2 commits intodevelopfrom
refactor/extract-lamp-for-rating

Conversation

@slime-hatena
Copy link
Copy Markdown
Member

#1020 より切り分け

@slime-hatena slime-hatena self-assigned this Mar 14, 2026
@slime-hatena slime-hatena added the Type: Refactoring A code change that neither fixes a bug nor adds a feature label Mar 14, 2026
Copilot AI review requested due to automatic review settings March 14, 2026 10:28
@github-actions github-actions bot added the Scope: Application Edited Application files label Mar 14, 2026
@slime-hatena slime-hatena merged commit 3cfed53 into develop Mar 14, 2026
3 checks passed
@slime-hatena slime-hatena deleted the refactor/extract-lamp-for-rating branch March 14, 2026 10:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

更新差分表示(#946)まわりで重複していた「レート計算用ランプ文字列(FB/FC/AB 等)の決定ロジック」を OngekiUtility に集約し、コピペ実装を解消するPRです(#1020 から切り分け)。

Changes:

  • OngekiUtility にランプ文字列を返す getLampForRating を追加
  • ViewUserRatingController でランプ判定の重複コードをユーティリティ呼び出しへ置換
  • ViewUserProgressController で旧スコア側ランプ判定の重複コードをユーティリティ呼び出しへ置換(不要な計算行も削除)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
OngekiScoreLog/app/Services/OngekiUtility.php ランプ文字列生成ロジックをメソッド化して共通化
OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php ランプ判定の重複コードを共通メソッド呼び出しへ置換
OngekiScoreLog/app/Http/Controllers/ViewUserProgressController.php 旧スコア側のランプ判定重複を共通化し、不要行も削除

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +238 to +242
public function getLampForRating(int $technicalScore, bool $fullBell, bool $fullCombo, bool $allBreak): string
{
if ($technicalScore == 1010000) {
if ($fullBell) {
return "FB/AB+";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Application Edited Application files Type: Refactoring A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants