Skip to content

refactor: remove unused $currentvalue param from phpMaxCreditsDelta()#7

Draft
sale4319 wants to merge 3 commits intotarnus:masterfrom
sale4319:fix/phpMaxCreditsDelta-remove-unused-param
Draft

refactor: remove unused $currentvalue param from phpMaxCreditsDelta()#7
sale4319 wants to merge 3 commits intotarnus:masterfrom
sale4319:fix/phpMaxCreditsDelta-remove-unused-param

Conversation

@sale4319
Copy link
Copy Markdown

@sale4319 sale4319 commented Feb 28, 2026

Branch: fix/phpMaxCreditsDelta-remove-unused-param

Refactor: Remove unused $currentvalue parameter

Goal: Clean up dead function signature in global_sched_funcs.php.

Changes:

  • Removed the unused $currentvalue parameter from phpMaxCreditsDelta() in global_sched_funcs.php

Commits:

  • 620c720 refactor: 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)

File Change
global_sched_funcs.php Scan fix + parameter removal
class/ (102 files) PHP 7+ compatibility
global_funcs.php, config, support files PHP 7+ compatibility
Backend library files CRLF normalisation + modern syntax
composer.json PHPMailer v6 dependency
.gitignore Untrack vendor, composer.phar, templates_c

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant