title: Repository method not found
body: <p>I have created a method to query to database for all joining table in repository. I also have read the documentation from <a href="https://symfony.com/doc/3.3/doctrine/repository.html" rel="nofollow noreferrer">How to create custom repository</a>. The method is working properly, but in PhpStorm there is a yellow warning </p>
  
  <blockquote>
    <p>Method 'findAllDetail' not found.</p>
  </blockquote>
  
  <p>How do I fix this warning?</p>
  
  <p>Below is my entity:</p>
  
  <pre><code>namespace App\Entity;
  
  use Doctrine\Common\Collections\ArrayCollection;
  use Doctrine\Common\Collections\Collection;
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\Validator\Constraints as Assert;
  
  /**
   * @ORM\Entity(repositoryClass="App\Repository\InvoiceRepository")
   */
  class Invoice
  {
  </code></pre>
  
  <p>and here is the <code>InvoiceRepository</code>:</p>
  
  <pre><code>namespace App\Repository;
  
  use App\Entity\Invoice;
  use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  use Symfony\Bridge\Doctrine\RegistryInterface;
  
  /**
   * @method Invoice|null find($id, $lockMode = null, $lockVersion = null)
   * @method Invoice|null findOneBy(array $criteria, array $orderBy = null)
   * @method Invoice[]    findAll()
   * @method Invoice[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
    */
   class InvoiceRepository extends ServiceEntityRepository
   {
       public function __construct(RegistryInterface $registry)
       {
           parent::__construct($registry, Invoice::class);
       }
  
       /**
        * @param $value
        * @return Invoice[] Returns an array of Invoice objects
        */
       public function findAllDetail($value)
       {
           $qb = $this-&gt;createQueryBuilder('i')
               /* .... */
           ;
           return $qb-&gt;execute();
       }
  </code></pre>
  
  <p>and here is the controller:</p>
  
  <pre><code> /**
   * @Route("/invoice/review/{idInvoice}", name="submitToReview", requirements={"idInvoice"="\d+"})
   * @param $idInvoice
   * @return \Symfony\Component\HttpFoundation\RedirectResponse
   */
  public function submitToReview($idInvoice, \Swift_Mailer $mailer)
  {
      $invoice = $this-&gt;getDoctrine()-&gt;getRepository(Invoice::class)-&gt;findAllDetail($idInvoice);
      /* @var $item \App\Entity\Invoice */
  </code></pre>