Skip to content

Commit 4dbfd73

Browse files
committed
Simplift condition in TrashedFilter
1 parent 828ba68 commit 4dbfd73

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Filters/TrashedFilter.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ class TrashedFilter extends SQLFilter
77
{
88
public function addFilterConstraint(ClassMetadata $metadata, $table)
99
{
10-
if ($this->isSoftDeletable($metadata->rootEntityName))
11-
return "{$table}.deleted_at IS NULL OR CURRENT_TIMESTAMP < {$table}.deleted_at";
12-
13-
return '';
10+
return $this->isSoftDeletable($metadata->rootEntityName) ? "{$table}.deleted_at IS NULL OR CURRENT_TIMESTAMP < {$table}.deleted_at" : '';
1411
}
1512

1613
private function isSoftDeletable($entity)

0 commit comments

Comments
 (0)