Skip to content

Commit

Permalink
Update DocumentRepository.php
Browse files Browse the repository at this point in the history
reordered if statement
  • Loading branch information
vudaltsov committed Jan 12, 2016
1 parent af346bc commit 6966563
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Doctrine/ODM/PHPCR/DocumentRepository.php
Expand Up @@ -168,13 +168,13 @@ public function findBy(array $criteria, array $orderBy = null, $limit = null, $o
$where = $qb->andWhere();
}

if (!is_array($value)) {
$this->constraintField($where, $field, $value, 'a');
} else {
if (is_array($value)) {
$where = $where->orX();
foreach ($value as $oneValue) {
$this->constraintField($where, $field, $oneValue, 'a');
}
} else {
$this->constraintField($where, $field, $value, 'a');
}
}

Expand Down

0 comments on commit 6966563

Please sign in to comment.