Inspectopedia Help

Complex class should be refactored

Reports the classes that are too complex.

Class complexity is evaluated based on three metrics:

  • TCC (Tight class cohesion) — the measure of class cohesiveness (more is better).

  • WMC (Weighted Method count) — the sum of cyclomatic complexities for all methods in a class (less is better).

  • ATFD (Access to foreign data) — the number of properties from another class that are accessed in the current class (less is better).

Inspection options

Option

Type

Default

TCC threshold

Number

0.333

WMC threshold

Number

50

ATFD threshold

Number

5

Inspection Details

Available in:

PhpStorm 2023.3, Qodana for PHP 2023.3

Plugin:

PHP Architecture, 233.SNAPSHOT

Last modified: 13 July 2023