title: Why does clean code forbid else expression
body: <p>I have this code in a function:</p>
  
  <pre><code>if ($route !== null) { // a route was found
      $route-&gt;dispatch();
  } else {
      // show 404 page
      $this-&gt;showErrorPage(404);
  }
  </code></pre>
  
  <p>Now PHPmd gives an error:</p>
  
  <blockquote>
    <p>The method run uses an else expression. Else is never necessary and
    you can simplify the code to work without else.</p>
  </blockquote>
  
  <p>Now I'm wondering if it really would be better code to avoid the else and just add a return statement to the if part?</p>