-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Review parameter names in ext/pspell #6257
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
ext/pspell/pspell.stub.php
Outdated
|
||
function pspell_check(int $pspell, string $word): bool {} | ||
function pspell_check(int $dictionary_id, string $word): bool {} |
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.
since the manual describes the return value of pspell_new()
as Returns the dictionary link identifier on success or FALSE on failure.
, I think it makes sense to rename $pspell
to $directory_id
(the manual refers to it as $directory_link
).
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.
O M G. Wow, this is even worse than usual! This extension uses resources, but instead of actually using them it works on resource IDs???
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.
So, considering that we should migrate these resource IDs to objects in the future, we should name them with that in mind. And we did use the $mysql
, $ldap
etc convention before, so keeping this at $pspell
would make sense to me. $dictionary_id
is sensible now, but not if we ever migrate this to a non-integer.
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 had a suspicion for a second that these are really resource IDs, but I thought that it's impossible, so rejected the idea.. Crazy!
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.
With that in mind, $pspell
and$config
seems the best choices for me as well.
cd47c4e
to
35ae42d
Compare
No description provided.