refactor: remove unused $currentvalue param from phpMaxCreditsDelta()#7
Draft
sale4319 wants to merge 3 commits intotarnus:masterfrom
Draft
refactor: remove unused $currentvalue param from phpMaxCreditsDelta()#7sale4319 wants to merge 3 commits intotarnus:masterfrom
sale4319 wants to merge 3 commits intotarnus:masterfrom
Conversation
The $currentvalue parameter in global_sched_funcs.php was accepted but never used — the function body is identical with or without it, and the parameter name implies behaviour (delta from current to desired) that was never implemented. global_funcs.php already declares phpMaxCreditsDelta($desiredvalue) with one parameter. This commit syncs global_sched_funcs.php to match. Callers: a full-codebase grep confirms zero PHP call sites for this function, so removing the parameter carries no compatibility risk and will not produce E_WARNING from mismatched argument counts.
global_funcs.php: drop dead second parameter from signature to match global_sched_funcs.php. Strip the trailing `, 0` argument from all call sites in create_game/100.inc, globals/set_max_credits.inc, planet_owned/repairfinal.inc, and planet_owned/upgradefinal.inc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
fix/phpMaxCreditsDelta-remove-unused-paramRefactor: Remove unused
$currentvalueparameterGoal: Clean up dead function signature in
global_sched_funcs.php.Changes:
$currentvalueparameter fromphpMaxCreditsDelta()inglobal_sched_funcs.phpCommits:
620c720refactor: remove unused $currentvalue param from phpMaxCreditsDelta()The $currentvalue parameter in global_sched_funcs.php was accepted but never used — the function body is identical with or without it, and the parameter name implies behaviour (delta from current to desired) that was never implemented.
global_funcs.php already declares phpMaxCreditsDelta($desiredvalue) with one parameter. This commit syncs global_sched_funcs.php to match.
Callers: a full-codebase grep confirms zero PHP call sites for this function, so removing the parameter carries no compatibility risk and will not produce E_WARNING from mismatched argument counts.
Files Changed (across all branches)
global_sched_funcs.phpclass/(102 files)global_funcs.php, config, support filescomposer.json.gitignore