-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Rename PDO parameters. #6220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename PDO parameters. #6220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more observation: usually, we use the $args
param names, except in setFetchMode()
where $params
is used. I think we should choose one of these terms (if it's really possible).
|
||
/** @return bool */ | ||
public function bindParam(string|int $parameter, mixed &$param, int $type = PDO::PARAM_STR, int $maxlen = 0, mixed $driverdata = null) {} | ||
public function bindParam(string|int $param, mixed &$bind_var, int $type = PDO::PARAM_STR, int $max_length = 0, mixed $driver_options = null) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could also imagine $var
instead of $bind_var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be convinced of that if others feel strongly. I felt "var" was too generic, and when writing it in named form bind_var
seemed more descriptive.
$passwd
/$password
.$driverdata
/$driver_options
to match docs.$class_name
/$class
, as we've done elsewhere.$param
instead of$parameter
.$ctor_args
because really?$fetch_style
/$fetch_mode
on the latter, since there is asetFetchMode
method. Except in cases where "fetch" is already in the method name, then just use$mode
. (I'm unsure about this one.)