for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Repository;
class ClientRepository extends \Doctrine\ORM\EntityRepository
{
/**
* @param string $ip
*
* @return Client|null
*/
public function findIpBanned($ip)
return $this->createQueryBuilder('c')
->select('c')
->where('c.ip = :param')
->andWhere('c.banned = 1')
->setParameter(':param', $ip)
->getQuery()
->getOneOrNullResult();
}