title: How to document magic (_call and _callStatic) methods for IDEs
body: <p>After many happy years coding in notepad++ and sublime, I've been advised to give a PHP IDE a go. I'm trying out phpStorm and it seems nice.  The code completion and documentation is a great feature but isn't working out for me when magic methods are used. <strong>Is there a work around to get phpStorm to understand what's going on in magic methods?</strong></p>
  
  <p>Our situation is something like this:</p>
  
  <pre><code>abstract class a {
      public static function __callStatic($method,$args)
      {
          if(strpos($method,"get_by_") === 0)
          {
              //do stuff
          } elseif(strpos($method,"get_first_by_") === 0) {
              //do stuff
          } elseif($method == "get_all") {
              //do stuff
          }
      }
  }
  
  class b extends a {
      // some more stuff
  }
  
  b::get_by_user_id(27);
  b::get_first_by_id(156);
  b::get_all();
  </code></pre>
  
  <p>The magic callStatic method allows us to get a collection of objects via 1 or more arguments that make up the function call.</p>
  
  <p>I see that there is an @method statement for use in these cases but phpStorm is only picking up the first of these statements. Furthermore I can only set the return type to mixed where as I'd prefer to be able to set it as whatever class this was called on (b in my example).</p>
  
  <p>Any ideas or suggestions would be very gratefully received, thanks.</p>