Skip to content
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

Incorrect coverage collection/display #220

Closed
aik099 opened this issue Feb 22, 2014 · 2 comments
Closed

Incorrect coverage collection/display #220

aik099 opened this issue Feb 22, 2014 · 2 comments

Comments

@aik099
Copy link

aik099 commented Feb 22, 2014

I've found out, that in following cases (see image) coverage information being incorrectly collected by xdebug or displayed in report:

  1. constant usage in multiline exception constructor call
  2. closing brace for private method, that is last method in class

incorrectcoverage

Related issue: http://bugs.xdebug.org/view.php?id=1032

@aik099
Copy link
Author

aik099 commented Feb 22, 2014

Relevant clover.xml part:

<package name="aik099\QATools\BEM\PropertyDecorator">
      <file name=".../library/aik099/QATools/BEM/PropertyDecorator/BEMPropertyDecorator.php">
        <class name="BEMPropertyDecorator" namespace="aik099\QATools\BEM\PropertyDecorator">
          <metrics methods="5" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="36" coveredstatements="30" elements="41" coveredelements="35"/>
        </class>
        <line num="56" type="method" name="__construct" crap="1" count="15"/>
        <line num="58" type="stmt" count="15"/>
        <line num="60" type="stmt" count="15"/>
        <line num="61" type="stmt" count="15"/>
        <line num="62" type="stmt" count="15"/>
        <line num="72" type="method" name="doDecorate" crap="6.81" count="10"/>
        <line num="74" type="stmt" count="10"/>
        <line num="76" type="stmt" count="10"/>
        <line num="77" type="stmt" count="1"/>
        <line num="80" type="stmt" count="9"/>
        <line num="82" type="stmt" count="8"/>
        <line num="83" type="stmt" count="8"/>
        <line num="85" type="stmt" count="0"/>
        <line num="88" type="stmt" count="0"/>
        <line num="89" type="stmt" count="0"/>
        <line num="90" type="stmt" count="0"/>
        <line num="92" type="stmt" count="0"/>
        <line num="95" type="stmt" count="1"/>
        <line num="105" type="method" name="_isBEMBlock" crap="1" count="9"/>
        <line num="107" type="stmt" count="9"/>
        <line num="117" type="method" name="_isBEMElement" crap="1" count="5"/>
        <line num="119" type="stmt" count="5"/>
        <line num="131" type="method" name="_assertAnnotationUsage" crap="10.02" count="8"/>
        <line num="133" type="stmt" count="8"/>
        <line num="134" type="stmt" count="2"/>
        <line num="135" type="stmt" count="2"/>
        <line num="137" type="stmt" count="2"/>
        <line num="141" type="stmt" count="6"/>
        <line num="143" type="stmt" count="6"/>
        <line num="144" type="stmt" count="4"/>
        <line num="145" type="stmt" count="4"/>
        <line num="147" type="stmt" count="4"/>
        <line num="149" type="stmt" count="2"/>
        <line num="150" type="stmt" count="1"/>
        <line num="151" type="stmt" count="1"/>
        <line num="153" type="stmt" count="1"/>
        <line num="155" type="stmt" count="1"/>
        <line num="156" type="stmt" count="1"/>
        <line num="157" type="stmt" count="1"/>
        <line num="159" type="stmt" count="1"/>
        <line num="161" type="stmt" count="0"/>
        <line num="164" type="stmt" count="0"/>
        <metrics loc="163" ncloc="97" classes="1" methods="5" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="36" coveredstatements="30" elements="41" coveredelements="33"/>
      </file>
    </package>

Actually line 164 is empty line at the end of a file. And I'm using TABs for indentation if that helps.

@sebastianbergmann
Copy link
Owner

This is not a PHP_CodeCoverage issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants