title: Reaching 100% Code Coverage with PHPUnit
body: <p>I've been in the process of creating a test suite for a project, and while I realize getting 100% coverage isn't <em>the</em> metric one should strive to, there is a strange bit in the code coverage report to which I would like some clarification. </p>
  
  <p>See screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/cZfQl.png" alt="enter image description here"></p>
  
  <p>Because the last line of the method being tested is a <code>return</code>, the final line (which is just a closing bracket) shows up as never being executed, and as a consequence the whole method is flagged as not executed in the overview. (Either that, or I'm not reading the report correctly.)</p>
  
  <p>The complete method: </p>
  
  <pre><code>static public function &amp;getDomain($domain = null) {
      $domain = $domain ?: self::domain();
  
      if (! array_key_exists($domain, self::$domains)) {
          self::$domains[$domain] = new Config();
      }
  
      return self::$domains[$domain];
  }
  </code></pre>
  
  <p>Is there a reason for this, or is it a glitch?</p>
  
  <p>(Yes, I read through <a href="https://stackoverflow.com/questions/7074022/how-to-get-100-code-coverage-with-phpunit">How to get 100% Code Coverage with PHPUnit</a>, different case although similar.)</p>
  
  <p>Edit: </p>
  
  <p>Trudging on through the report, I noticed the same is true for a <code>switch</code> statement elsewhere in the code. So this behaviour is at least to some extent consistent, but baffling to me none the less.</p>
  
  <p>Edit2:</p>
  
  <p>I'm running on: PHPUnit 3.6.7, PHP 5.4.0RC5, XDebug 2.2.0-dev on a OS X</p>