Make prohibited word search work

This commit is contained in:
Sobuno 2025-01-03 00:13:51 +01:00
parent 058a0f9fb2
commit 50aff9cfb6

View File

@ -2774,7 +2774,7 @@ class OperatorQuerySearch implements SearchInterface
public function searchTransactions(): LengthAwarePaginator
{
$this->parseTagInstructions();
if (0 === count($this->getWords()) && 0 === count($this->getOperators())) {
if (0 === count($this->getWords()) && 0 === count($this->getExcludedWords()) && 0 === count($this->getOperators())) {
return new LengthAwarePaginator([], 0, 5, 1);
}
@ -2831,6 +2831,11 @@ class OperatorQuerySearch implements SearchInterface
return $this->words;
}
public function getExcludedWords(): array
{
return $this->prohibitedWords;
}
public function setDate(Carbon $date): void
{
$this->date = $date;