1.2.637. Locally Used Property

List of properties that are used in the class where they are defined.

<?php

class foo {
    public $unused, $used;// property $unused is never used in this class

    function bar() {
        $this->used++; // property $used is used in this method
    }
}

$foo = new Foo();
$foo->unused = 'here'; // property $unused is used outside the class definition
?>

1.2.637.1. Specs

Short name

Classes/LocallyUsedProperty

Rulesets

All

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

property

Available in

Entreprise Edition, Exakat Cloud