1.2.1003. Property Used Below

This rule marks properties that are used in children classes.

This analysis doesn’t mark the current class, nor the parent or grand parent classes.

<?php

class foo {
    // This property is used in children
    protected protectedProperty = 1;

    // This property is not used in children
    protected localProtectedProperty = 1;

    private function foobar() {
        // protectedProperty is used here, but defined in parent
        $this->localProtectedProperty = 3;
    }
}

class foofoo extends foo {
    private function bar() {
        // protectedProperty is used here, but defined in parent
        $this->protectedProperty = 3;
    }
}

?>

See also Property Used Above.

1.2.1003.1. Specs

Short name

Classes/PropertyUsedBelow

Rulesets

All

Exakat since

0.8.4

PHP Version

All

Severity

Minor

Time To Fix

Slow (1 hour)

Precision

Medium

Features

property

Available in

Entreprise Edition, Exakat Cloud