code: public function findOneByCustomerAndNumber(CustomerInterface $customer, $number)
      {
          $qb = $this->createQueryBuilder('i');
  
          return $qb
              ->join('i.order', 'o')
              ->andWhere($qb->expr()->eq('o.customer', ':customer'))
              ->andWhere($qb->expr()->eq('o.sample', ':sample'))
              ->andWhere($qb->expr()->eq('i.number', ':number'))
              ->addOrderBy('i.createdAt', 'ASC')
              ->getQuery()
              ->setParameter('customer', $customer)
              ->setParameter('sample', false)
              ->setParameter('number', $number)
              ->getOneOrNullResult();
      }
docs: @inheritDoc
  
  @return OrderInvoiceInterface