original_string: public function findArchivedEventsQuery(Production $production)
      {
          $qb = $this->createQueryBuilder('e');
  
          return $qb
              // Add joins.
              ->join('e.groups', 'g')
  
              // Add conditions.
              ->andWhere($qb->expr()->eq('g', ':production'))
              ->andWhere($qb->expr()->eq('e.active', ':active'))
              ->andWhere($qb->expr()->isNull('e.schedule'))
  
              // Add parameters.
              ->setParameter('production', $production)
              ->setParameter('active', false)
  
              // Add ordering.
              ->addOrderBy('e.updated', 'DESC')
  
              // Get query.
              ->getQuery();
      }
code: public function findArchivedEventsQuery(Production $production)
      {
          $qb = $this->createQueryBuilder('e');
  
          return $qb
              // Add joins.
              ->join('e.groups', 'g')
  
              // Add conditions.
              ->andWhere($qb->expr()->eq('g', ':production'))
              ->andWhere($qb->expr()->eq('e.active', ':active'))
              ->andWhere($qb->expr()->isNull('e.schedule'))
  
              // Add parameters.
              ->setParameter('production', $production)
              ->setParameter('active', false)
  
              // Add ordering.
              ->addOrderBy('e.updated', 'DESC')
  
              // Get query.
              ->getQuery();
      }
code_tokens: public function findArchivedEventsQuery ( Production $ production ) { $ qb = $ this -> createQueryBuilder ( 'e' ) ; return $ qb // Add joins. -> join ( 'e.groups' , 'g' ) // Add conditions. -> andWhere ( $ qb -> expr ( ) -> eq ( 'g' , ':production' ) ) -> andWhere ( $ qb -> expr ( ) -> eq ( 'e.active' , ':active' ) ) -> andWhere ( $ qb -> expr ( ) -> isNull ( 'e.schedule' ) ) // Add parameters. -> setParameter ( 'production' , $ production ) -> setParameter ( 'active' , false ) // Add ordering. -> addOrderBy ( 'e.updated' , 'DESC' ) // Get query. -> getQuery ( ) ; }
docstring: Helper function to search for events that are not active.
  
  @param Production $production The production to search in.
  
  @return Event[]
docstring_tokens: Helper function to search for events that are not active .