UnionOfRAD / li3_quality

(unmaintained) Code quality assurance for li₃.
BSD 3-Clause "New" or "Revised" License
12 stars 10 forks source link

protected methods/properties false positive #85

Open mariuswilms opened 10 years ago

mariuswilms commented 10 years ago

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

bayleedev commented 10 years ago

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 commented 10 years ago

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