Skip to content

File::findExtendedClassName() doesn't support nested classes#2127

Merged
gsherwood merged 1 commit intosquizlabs:masterfrom
jrfnl:feature/bugfix-find-extended-class
Aug 20, 2018
Merged

File::findExtendedClassName() doesn't support nested classes#2127
gsherwood merged 1 commit intosquizlabs:masterfrom
jrfnl:feature/bugfix-find-extended-class

Conversation

@jrfnl
Copy link
Copy Markdown
Contributor

@jrfnl jrfnl commented Aug 19, 2018

The method used the class scope closer to end searches, which meant that a non-extended class which contained a nested extended class would return the extended class name of the nested class, instead of false.

Switching this to the scope opener, fixes this.

Included unit tests.

The method used the class scope closer to end searches, which meant that a non-extended class which contained a nested extended class would return the extended class name of the nested class, instead of `false`.

Switching this to the scope opener, fixes this.

Included unit tests.
@gsherwood gsherwood added this to the 3.3.2 milestone Aug 20, 2018
@gsherwood gsherwood changed the title File::findExtendedClassName(): bugfix with nested classes File::findExtendedClassName() doesn't support nested classes Aug 20, 2018
@gsherwood gsherwood merged commit a3232a6 into squizlabs:master Aug 20, 2018
gsherwood added a commit that referenced this pull request Aug 20, 2018
@gsherwood
Copy link
Copy Markdown
Member

That's a strange one. I wonder why I would have picked the scope closer over the opener when looking for an extends keyword 🤷‍♂️

Thanks for fixing it.

@jrfnl jrfnl deleted the feature/bugfix-find-extended-class branch August 20, 2018 07:29
@jrfnl
Copy link
Copy Markdown
Contributor Author

jrfnl commented Aug 20, 2018

You're welcome.

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.

2 participants