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

protected methods/properties false positive #85

Open
mariuswilms opened this issue Oct 2, 2014 · 2 comments
Open

protected methods/properties false positive #85

mariuswilms opened this issue Oct 2, 2014 · 2 comments
Labels

Comments

@mariuswilms
Copy link
Member

Some protected methods from core PHP class can only be overridden or reimplemented without using a leading underscore. This must be an exception.

@mariuswilms mariuswilms added the Bug label Oct 2, 2014
@bayleedev
Copy link
Member

How would you know unless you made an exception for each one?

If a method is protected, when overwriting it you can make it public.

@mariuswilms
Copy link
Member Author

A possible solution would be to inspect the parent/s method/property and check if already has been protected. The failing test here is with template/TemplateException overriding the $code property from:
http://php.net/manual/de/class.exception.php

@mariuswilms mariuswilms changed the title protected methods false positive protected methods/properties false positive Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants