phpinsights
phpinsights copied to clipboard
use config for calculating complexity
| Q | A |
|---|---|
| Bug fix? | yes |
| New feature? | no |
Previously configuration value for max allowed complexity was only used for reporting errors. For calculating complexity percentage 1 was always used as max allowed complexity. As a result when setting this config value to any number higher than 1 and having any class with complexity higher than 1 disallowed to have complexity percentage at level 100%. This PR fixes this - for now config value for max allowed complexity is both used for percentage calculations and for error reporting