Mistake in documentation on CyclomaticComplexity page? #433

Closed
roukmoute opened this Issue Jan 6, 2017 · 0 comments

Projects

None yet

3 participants

@roukmoute
roukmoute commented Jan 6, 2017 edited

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 milestone: 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