This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241113 - Warn if user tries to degrade the function's access level on inheriting class
Summary: Warn if user tries to degrade the function's access level on inheriting class
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-29 12:25 UTC by vmattila
Modified: 2016-09-22 18:45 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vmattila 2014-01-29 12:25:06 UTC
The following function declaration is not allowed in PHP:

class Parent {
    public function getSomething() { }
}
class SubClass extends Parent {
    protected function getSomething() { }
}

It would be useful if NetBeans marked the SubClass's function declaration invalid, similar to concrete classes that do not inherit abstract methods from the parent.
Comment 1 amobilia 2016-09-22 18:45:14 UTC
Reproductible in 8.2rc / Dev 201609210002