/** * @param PersonCriteria $criteria */ private function checkDob(PersonCriteria $criteria) { if ($criteria->hasDob()) { $this->qb->andWhere('p.dob = :dob'); $this->qb->setParameter('dob', $criteria->getDob()); } }