Skip to content

Update ext/xsl parameter names #6295

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

Closed
wants to merge 3 commits into from
Closed

Update ext/xsl parameter names #6295

wants to merge 3 commits into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Oct 7, 2020

Additionally normalize to using $namespace rather than $uri for namespace parameters, including in XMLReader and XMLWriter. I went with that one as it is currently used by DOM, SimpleXML and XSL -- and our DOM parameter names follow the DOM specification. cc @dtakken on that one, as you picked $uri.

Copy link
Member

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could only find one small thing:

Instead of
public function setSecurityPrefs(int $securityPrefs) {}
what about
public function setSecurityPrefs(int $securityPreferences) {}

But that's all the comments from my side.

@dtakken
Copy link

dtakken commented Oct 7, 2020

Consistently using $namespace everywhere is fine with me!

@dtakken
Copy link

dtakken commented Oct 7, 2020

I could only find one small thing:

Instead of
public function setSecurityPrefs(int $securityPrefs) {}
what about
public function setSecurityPrefs(int $securityPreferences) {}

But that's all the comments from my side.

I prefer names that contain dictionary words, it keeps my spell checker quiet. ;)

How about just $preferences? Both "security" and "preferences" are already in the function name, picking one for the parameter name should be sufficiently clear?

@nikic
Copy link
Member Author

nikic commented Oct 8, 2020

I went with $securityPrefs -> $preferences. Another possible option would be $flags.

Copy link
Member

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@php-pulls php-pulls closed this in 1fba220 Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants