Repository/BaseOrderRepository.php
public function findAllByTypeAndData($type, $data)
    {
        $qb = $this->createQueryBuilder('o')
            ->where('o.createdAt < :date and o.state = 1')
            ->setParameter('date', new \DateTime());

        return $qb
            ->getQuery()
            ->getResult()
            ;
    }
public function findAllByTypeAndData($type, $data)
    {
        $qb = $this->createQueryBuilder('o')
            ->where('o.createdAt < :date and o.state = 1')
            ->setParameter('date', new \DateTime());

        return $qb
            ->getQuery()
            ->getResult()
            ;
    }
@param $type
@param $data

@return array