sebastianbergmann/phploc — Issue #23: filter LOC count
Author: aimfeld
Created: 2012-03-05 08:49:27+00:00
State: open

Hi there,

Thanks for providing such a great tool :). I have a suggestion to make the lines of code (LOC) count and the Cyclomatic Complexity / LOC measures more comparable between projects. I suggest filtering out empty lines and lines containing only { or }. The code formatting currently confounds these measures quite a lot. These snippets should give the same Complexity / LOC measure.

if ($condition) {
echo "Hello";
echo "There";
}

if ($condition)
{
// Boy, I like to comment everything
echo "Hello";

// even if it doesn't make sense
echo "There";
}