private function getTimedRecords(ContentRepository $contentRepo, $type)
    {
        /** @var QueryBuilder $query */
        $query = $contentRepo->createQueryBuilder('t')
            ->andWhere('t.status = :status')
            ->setParameter('currenttime', Carbon::now(), Type::DATETIME)
        ;

        if ($type === 'timed') {
            $this->getTimedPublishQuery($query);
        } elseif ($type === 'hold') {
            $this->getHoldQuery($query);
        } else {
            throw new StorageException(sprintf('Invalid type "%s" for timed record processing.', $type));
        }

        return $contentRepo->findWith($query) ?: [];
    }
private function getTimedRecords(ContentRepository $contentRepo, $type)
    {
        /** @var QueryBuilder $query */
        $query = $contentRepo->createQueryBuilder('t')
            ->andWhere('t.status = :status')
            ->setParameter('currenttime', Carbon::now(), Type::DATETIME)
        ;

        if ($type === 'timed') {
            $this->getTimedPublishQuery($query);
        } elseif ($type === 'hold') {
            $this->getHoldQuery($query);
        } else {
            throw new StorageException(sprintf('Invalid type "%s" for timed record processing.', $type));
        }

        return $contentRepo->findWith($query) ?: [];
    }
private function getTimedRecords ( ContentRepository $ contentRepo , $ type ) { /** @var QueryBuilder $query */ $ query = $ contentRepo -> createQueryBuilder ( 't' ) -> andWhere ( 't.status = :status' ) -> setParameter ( 'currenttime' , Carbon :: now ( ) , Type :: DATETIME ) ; if ( $ type === 'timed' ) { $ this -> getTimedPublishQuery ( $ query ) ; } elseif ( $ type === 'hold' ) { $ this -> getHoldQuery ( $ query ) ; } else { throw new StorageException ( sprintf ( 'Invalid type "%s" for timed record processing.' , $ type ) ) ; } return $ contentRepo -> findWith ( $ query ) ? : [ ] ; }
Set the QueryBuilder where parameters.

@param ContentRepository $contentRepo
@param string            $type

@throws \Exception

@return Content[]|false
Set the QueryBuilder where parameters .