1.2.1370. 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.1370.1. Specs

Short name

Classes/UsedProtectedMethod

Rulesets

All, Changed Behavior

Exakat since

0.8.4

PHP Version

All

Severity

Minor

Time To Fix

Slow (1 hour)

Precision

Very high

Features

visibility

Available in

Entreprise Edition, Exakat Cloud