title: In PHPStorm, how can I make type hinting work when I have a superclass method that returns a different type from each subclass
body: <p>I have a class that is inheriting from a superclass and where the superclass has a static <code>find()</code> method that instantiates instances of the subclass (active record pattern). </p>
  
  <pre><code>class ActiveRecordClass {
  
      /**
       * @return mixed
       */
      public static function find() {
          // Code returns instance of called class
      }
  }
  
  class ModelClass extends ActiveRecordClass {
  
  }
  
  // returns instance of ModelClass, but PHPStorm doesn't realise
  ModelClass::find($model_id); 
  </code></pre>
  
  <p>At the moment, the docblock is not much good for code completion and type hinting. I can't use the superclass as a return type as the subclasses have different methods due to DB columns. </p>
  
  <p>How can I indicate to PHPStorm that the superclass <code>find()</code> method returns an instance of the subclass it's called from, so that code completion works?</p>