1.2.1379. Used Protected Method¶
This rule marks protected methods being used in the current class or its children classes. This show how the methods are used inside a class hierarchy.
<?php
class foo {
// This is reported
protected usedByChildren() {}
// This is not reported
protected notUsedByChildren() {}
}
class bar extends foo {
// The parent method is not overloaded, though it may be
protected someMethod() {
// The parent method is called
$this->usedByChildren();
}
}
?>
See also Visibility.
1.2.1379.1. Connex PHP features¶
1.2.1379.1.1. Specs¶
Short name |
Classes/UsedProtectedMethod |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Available in |