Skip to content

Commit 2ecdbc0

Browse files
committed
Fix psalm errors
1 parent 036b302 commit 2ecdbc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/WithFilters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function applySearchFilter(Builder $query): Builder
228228
$whereColumn = $selectedColumn ?? $column->column();
229229

230230
// TODO: Skip Aggregates
231-
if (! $hasRelation && $query instanceof Builder) {
231+
if (! $hasRelation) {
232232
$whereColumn = $query->getModel()->getTable() . '.' . $whereColumn;
233233
}
234234

@@ -240,7 +240,7 @@ public function applySearchFilter(Builder $query): Builder
240240
$fieldName = ColumnUtilities::parseField($column->column());
241241

242242
// We use whereHas which can work with unselected relations
243-
$subQuery->orWhereHas($relationName, function (Builder $hasQuery) use ($fieldName, $column, $search) {
243+
$subQuery->orWhereHas($relationName, function (Builder $hasQuery) use ($fieldName, $search) {
244244
$hasQuery->where($fieldName, 'like', '%' . $search . '%');
245245
});
246246
}

0 commit comments

Comments
 (0)