mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-18 00:09:54 +03:00
Removed unnecesary if statements
This commit is contained in:
parent
dc08286a72
commit
3e565d3830
2 changed files with 3 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue