public function findCrashedExports(\DateTime $before = null)
    {
        $qb = $this->createQueryBuilder('e');
        $qb->where($qb->expr()->gte('e.crash', 'e.nbretry'));

        if (null !== $before) {
            $qb->andWhere($qb->expr()->lte('e.created', ':created'));
            $qb->setParameter(':created', $before);
        }

        return $qb->getQuery()->getResult();
    }
public function findCrashedExports(\DateTime $before = null)
    {
        $qb = $this->createQueryBuilder('e');
        $qb->where($qb->expr()->gte('e.crash', 'e.nbretry'));

        if (null !== $before) {
            $qb->andWhere($qb->expr()->lte('e.created', ':created'));
            $qb->setParameter(':created', $before);
        }

        return $qb->getQuery()->getResult();
    }
public function findCrashedExports ( \ DateTime $ before = null ) { $ qb = $ this -> createQueryBuilder ( 'e' ) ; $ qb -> where ( $ qb -> expr ( ) -> gte ( 'e.crash' , 'e.nbretry' ) ) ; if ( null !== $ before ) { $ qb -> andWhere ( $ qb -> expr ( ) -> lte ( 'e.created' , ':created' ) ) ; $ qb -> setParameter ( ':created' , $ before ) ; } return $ qb -> getQuery ( ) -> getResult ( ) ; }
Returns exports that crashed. If a date is provided, only exports created
before this date are returned.

@param \DateTime $before An optional date to search

@return array
Returns exports that crashed . If a date is provided only exports created before this date are returned .