-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Review parameter names in ext/zlib #6250
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
Conversation
I think something went wrong here, this only has a change in bz2 now. |
Weird.. For me, GitHub (also) shows that 9 files were changed. And I see everything I pushed. No idea what happened. |
@@ -823,13 +823,13 @@ function ftell($stream): int|false {} | |||
function fflush($stream): bool {} | |||
|
|||
/** @param resource $stream */ | |||
function fwrite($stream, string $string, ?int $max_length = null): int|false {} | |||
function fwrite($stream, string $data, ?int $max_length = null): int|false {} |
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'm not sure I see a compelling reason to deviate from the usual $string
name here. For that matter, if we s/$data/$string in all those gz APIs, I don't think things get worse. Do they?
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'm not opposed to use $string
, but I'd prefer $data
much more than $string
since it describes the purpose of the parameter much better. And actually, we used $data
in case of SessionHandler::write()
and shmop_write()
, that's why I'd like to follow the practice here as well
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.
Okay, I'm fine with that. It might make sense to also adjust file_put_contents() while you're already here.
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've just applied this to master
@@ -823,13 +823,13 @@ function ftell($stream): int|false {} | |||
function fflush($stream): bool {} | |||
|
|||
/** @param resource $stream */ | |||
function fwrite($stream, string $string, ?int $max_length = null): int|false {} | |||
function fwrite($stream, string $data, ?int $max_length = null): int|false {} |
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.
Okay, I'm fine with that. It might make sense to also adjust file_put_contents() while you're already here.
No description provided.