1.2.185. Collect Property Counts

This analysis collects the number of properties per class or trait.

The count applies to classes, anonymous classes and traits. They are considered distinct one from another.

Properties may be static or not. Visibility, default values and typehints are omitted.

<?php

class foo {
    // 3 properties
    private $p1, $p2, $p3;
}

trait foo {
    // 3 properties
    protected $p1;
    public $p2 = 1, $p3;
}

?>

1.2.185.1. Specs

Short name

Dump/CollectPropertyCounts

Rulesets

All, CE, Changed Behavior, Dump

Exakat since

2.1.2

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

property

Available in

Entreprise Edition, Community Edition, Exakat Cloud