1.2.170. Collect Class Traits Counts¶
This rule counts the number of trait used in a class. The direct traits are counted, not the traits of the traits.
<?php
// Use no traits
class x {}
// Use one trait
class y {
use TraitT;
}
?>
1.2.170.1. Connex PHP features¶
1.2.170.1.1. Specs¶
Short name |
Dump/CollectClassTraitsCounts |
Rulesets |
|
Exakat since |
2.1.7 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Available in |