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

ObjectDeclarations::getClassProperties(): allow for abstract final #252

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 13, 2021

Having both abstract as well as final as a modifier for a class is an oxymoron (and a parse error in PHP), but the utility methods should not have an opinion on that.

The original BCFile::getClassProperties() method already handled this correctly.

Now the ObjectDeclarations::getClassProperties() method does as well.

Includes moving a test from the "diff" test files to the generic test files.

Note: this does potentially make the method slower as it has to search further before deciding it has found all applicable keywords, but that's just how it is.

Having both `abstract` as well as `final` as a modifier for a class is an oxymoron (and a parse error in PHP), but the utility methods should not have an opinion on that.

The original `BCFile::getClassProperties()` method already handled this correctly.

Now the `ObjectDeclarations::getClassProperties()` method does as well.

Includes moving a test from the "diff" test files to the generic test files.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone May 13, 2021
@jrfnl jrfnl merged commit 7a4fab4 into develop May 13, 2021
@jrfnl jrfnl deleted the feature/objectdeclarations-getclassproperties-allow-for-final branch May 13, 2021 01:44
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.

None yet

1 participant