Skip to content

Commit

Permalink
Rector
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Dec 7, 2024
1 parent e74160e commit 998726b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Filter/StringFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function filter(ProxyQueryInterface $query, string $field, FilterData
return;
}

$value = trim($data->getValue());
$value = trim((string) $data->getValue());

if ('' === $value) {
return;
Expand Down
4 changes: 2 additions & 2 deletions tests/Filter/CallbackFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function testFilterMethodEmpty(): void
$filter = new CallbackFilter();
$filter->initialize('field_name', [
'field_name' => self::DEFAULT_FIELD_NAME,
'callback' => [$this, 'customCallback'],
'callback' => $this->customCallback(...),
]);

$filter->apply($builder, FilterData::fromArray([]));
Expand All @@ -72,7 +72,7 @@ public function testFilterMethodNotEmpty(): void
$filter = new CallbackFilter();
$filter->initialize('field_name', [
'field_name' => self::DEFAULT_FIELD_NAME,
'callback' => [$this, 'customCallback'],
'callback' => $this->customCallback(...),
]);

$filter->apply($builder, FilterData::fromArray(['value' => 'myValue']));
Expand Down

0 comments on commit 998726b

Please sign in to comment.