src/Validation/Laravel/DoctrinePresenceVerifier.php
protected function addWhere($qb, $key, $extraValue, $alias = 'o') {
        $reference = $key . '.' . $alias;
        if($extraValue === 'NULL') {
            $qb->andWhere($reference . ' is NULL');
        } elseif($extraValue === 'NOT_NULL') {
            $qb->andWhere($reference . ' is NOT NULL');
        } elseif(is_array($extraValue)) {
            list($operator, $value) = $extraValue;
            $this->addWhereAdvanced($qb, $key, $operator, $value, $alias);
        } else {
            $this->addWhereAdvanced($qb, $key, '=', $extraValue, $alias);
        }
    }
protected function addWhere($qb, $key, $extraValue, $alias = 'o') {
        $reference = $key . '.' . $alias;
        if($extraValue === 'NULL') {
            $qb->andWhere($reference . ' is NULL');
        } elseif($extraValue === 'NOT_NULL') {
            $qb->andWhere($reference . ' is NOT NULL');
        } elseif(is_array($extraValue)) {
            list($operator, $value) = $extraValue;
            $this->addWhereAdvanced($qb, $key, $operator, $value, $alias);
        } else {
            $this->addWhereAdvanced($qb, $key, '=', $extraValue, $alias);
        }
    }
Add a "where" clause to the given query.

@param  object $qb
@param  string $key
@param  string $extraValue
@param  string  $alias
@return void