for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Rafał Muszyński <[email protected]>
* @copyright 2015 Sourcefabric z.ú.
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/
namespace Newscoop\PaywallBundle\Entity\Repository;
use Doctrine\ORM\EntityRepository;
* Discount repository.
class DiscountRepository extends EntityRepository
{
* Finds active discounts.
public function findActive()
$qb = $this
->createQueryBuilder('d')
->orderBy('d.countBased', 'DESC')
;
return $qb
->getQuery()
}
* Finds count based discounts.
public function findCountBased()
->where('d.countBased = true')
->orderBy('d.createdAt', 'DESC')