diff --git a/module/Core/src/Repository/ShortUrlRepository.php b/module/Core/src/Repository/ShortUrlRepository.php index b4a2ec6e..4fa6fbd1 100644 --- a/module/Core/src/Repository/ShortUrlRepository.php +++ b/module/Core/src/Repository/ShortUrlRepository.php @@ -132,9 +132,7 @@ class ShortUrlRepository extends EntitySpecificationRepository implements ShortU ->andWhere($qb->expr()->in('t.name', $tags)); } - if ($spec) { - $this->applySpecification($qb, $spec, 's'); - } + $this->applySpecification($qb, $spec, 's'); return $qb; } @@ -198,9 +196,7 @@ class ShortUrlRepository extends EntitySpecificationRepository implements ShortU $this->whereDomainIs($qb, $domain); - if ($spec !== null) { - $this->applySpecification($qb, $spec, 's'); - } + $this->applySpecification($qb, $spec, 's'); return $qb; } diff --git a/module/Core/src/Repository/TagRepository.php b/module/Core/src/Repository/TagRepository.php index 71d291ef..a2cb5bfd 100644 --- a/module/Core/src/Repository/TagRepository.php +++ b/module/Core/src/Repository/TagRepository.php @@ -38,9 +38,7 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito ->groupBy('t') ->orderBy('t.name', 'ASC'); - if ($spec !== null) { - $this->applySpecification($qb, $spec, 't'); - } + $this->applySpecification($qb, $spec, 't'); $query = $qb->getQuery();