New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistake in documentation on CyclomaticComplexity page? #433

roukmoute opened this Issue Jan 6, 2017 · 0 comments


None yet
3 participants

roukmoute commented Jan 6, 2017

In your example on this page, you count default in conditional statements.

But it should not be, like else or try.
The assumption is that all three statements will contain the default execution.

Is it normal in PHPMD or is it a small mistake?

Thanks :)

--- EDIT
Oh and in fact, with your example, phpmd give me 11 :)

test.php:5 The method example() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.

@ravage84 ravage84 added this to the 2.5.1 milestone Jan 6, 2017

@ravage84 ravage84 added the Bug label Jan 6, 2017

@ravage84 ravage84 modified the milestones: 2.5.1, 2.6.0 Jan 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment