title: Type hinting of returned entity in Doctrine2 repository
body: <p>I have <code>CustomRepository</code> class which extends <code>Doctrine\ORM\EntityRepository</code>. This repository is assosiated with many different entities.
  There is a method in the repository which returns an associated entity.  </p>
  
  <pre><code>class CustomRepository extends \Doctrine\ORM\EntityRepository
  {
      function getEntity() { ... } // returns an instance of associated entity
  }
  
  /**
   * @ORM\Entity(repositoryClass="CustomRepository")
   */
  class EntityClass1 { ... }    
  /**
   * @ORM\Entity(repositoryClass="CustomRepository")
   */
  class EntityClass2 { ... }
  
  $repo1 = $entityManager-&gt;getRepository('Entity1');
  $entity1 = $repo1-&gt;getEntity(); // will return an instance of EntityClass1
  
  $repo2 = $entityManager-&gt;getRepository('Entity2');
  $entity2 = $repo1-&gt;getEntity(); // will return an instance of EntityClass2
  </code></pre>
  
  <p>I use Symfony 2 plugin, which correctly detects the class of returned by inherited methods entities as <code>find</code>.<br>
  Is there a way to inform the plugin that the method returns an assosiated entity?</p>