title: PhpStorm inspection bug or bad code? Exception not thrown in try block is unexpected
body: <p>I'm using PhpStorm and I'm throwing a custom exception in the parent class of a child class that I have an instance of.</p>
  
  <p>I'm not catching the exception from the parent call in the child because I want catching that to be the responsibility of the code making the call on the child class instance.</p>
  
  <p>PhpStorm is complaining that the caught exception is not thrown in the try block, but the method on the parent does throw it, this method is being called from the child method which is being called within the try block.</p>
  
  <p>Is this a bug with the inspector or am I actually doing something wrong here?</p>
  
  <p>Here is some sample code that replicates the issue:</p>
  
  <pre><code>&lt;?php
  
  class testE extends \Exception {
  }
  
  
  class parentClass {
  
      public function testMethod() {
          throw new testE('test exception');
      }
  }
  
  class childClass extends parentClass {
  
      public function doSomething() {
          $this-&gt;testMethod();
      }
  }
  
  $test = new childClass;
  try {
      $test-&gt;doSomething();
  } catch(testE $e) {
      //   ^--- why does this report no throw in try?
      // Exception 'testE' is never thrown in the corresponding try block
      // Will this still work even though phpstorm complains?
  }
  </code></pre>
  
  <p>And here is a picture</p>
  
  <p><a href="https://i.stack.imgur.com/EKq29.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EKq29.png" alt="screenshot"></a></p>