Skip to content
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

Docblock param description wrong for utf8_accents_to_ascii() in phputf8 #45

Open
gnanet opened this issue Jul 19, 2023 · 0 comments
Open

Comments

@gnanet
Copy link

gnanet commented Jul 19, 2023

* @param int (optional) -1 lowercase only, +1 uppercase only, 1 both cases

According the sourcecode, you may skip the parameter, or you have to set the parameter to zero for translate both cases, NOT 1 as declared in the description of the function.
See:

if($case <= 0){
        if ( is_null($UTF8_LOWER_ACCENTS) ) {
...
if($case >= 0){
        if ( is_null($UTF8_UPPER_ACCENTS) ) {
...

So the right parameter description would be:

 * @param int (optional) -1 lowercase only, +1 uppercase only, 0 both cases
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

No branches or pull requests

1 participant