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

Fix non-static methods called as static '::' methods #540

Merged
merged 1 commit into from
Sep 13, 2020
Merged

Fix non-static methods called as static '::' methods #540

merged 1 commit into from
Sep 13, 2020

Conversation

Ayesh
Copy link
Contributor

@Ayesh Ayesh commented Sep 10, 2020

Fixes a couple static calls in TableParser class that used static method call pattern (::) on non-static calls ('->`).

Thank you.

@GrahamCampbell
Copy link
Member

I think the bug is that the method is not static, not that it is called wrong? The method should instead be changed to be static.

@Ayesh
Copy link
Contributor Author

Ayesh commented Sep 12, 2020

Hi @GrahamCampbell - Thanks for the review.
parseCell is a private method and TableParser is declared final, but parseCell method uses instance properties ($this->columns) so I propose that we change the call to a non-static call.

@GrahamCampbell
Copy link
Member

Oh, yeh.

@colinodell
Copy link
Member

Thanks for the fix!

@colinodell colinodell merged commit 0a90d68 into thephpleague:latest Sep 13, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants