Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -23,6 +23,7 @@
declare(strict_types=1);
namespace FireflyIII\Support\Search;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
@@ -61,11 +62,11 @@ class AccountSearch implements GenericSearchInterface
public function search(): Collection
{
$searchQuery = $this->user->accounts()
->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id')
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
->whereIn('account_types.type', $this->types);
$like = sprintf('%%%s%%', $this->query);
$searchQuery = $this->user->accounts()
->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id')
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
->whereIn('account_types.type', $this->types);
$like = sprintf('%%%s%%', $this->query);
$originalQuery = $this->query;
switch ($this->field) {
default:

View File

@@ -23,6 +23,7 @@
declare(strict_types=1);
namespace FireflyIII\Support\Search;
use Illuminate\Support\Collection;
/**

View File

@@ -50,7 +50,6 @@ use Gdbots\QueryParser\Node\Phrase;
use Gdbots\QueryParser\Node\Subquery;
use Gdbots\QueryParser\Node\Url;
use Gdbots\QueryParser\Node\Word;
use Gdbots\QueryParser\ParsedQuery;
use Gdbots\QueryParser\QueryParser;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
@@ -68,6 +67,7 @@ class OperatorQuerySearch implements SearchInterface
private GroupCollectorInterface $collector;
private CurrencyRepositoryInterface $currencyRepository;
private Carbon $date;
private array $invalidOperators;
private int $limit;
private Collection $operators;
private int $page;
@@ -75,7 +75,6 @@ class OperatorQuerySearch implements SearchInterface
private TagRepositoryInterface $tagRepository;
private array $validOperators;
private array $words;
private array $invalidOperators;
/**
* OperatorQuerySearch constructor.
@@ -101,6 +100,14 @@ class OperatorQuerySearch implements SearchInterface
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
}
/**
* @return array
*/
public function getInvalidOperators(): array
{
return $this->invalidOperators;
}
/**
* @inheritDoc
* @codeCoverageIgnore
@@ -193,14 +200,6 @@ class OperatorQuerySearch implements SearchInterface
$this->collector->setLimit($this->limit);
}
/**
* @return array
*/
public function getInvalidOperators(): array
{
return $this->invalidOperators;
}
/**
* @inheritDoc
* @codeCoverageIgnore

View File

@@ -32,6 +32,11 @@ use Illuminate\Support\Collection;
*/
interface SearchInterface
{
/**
* @return array
*/
public function getInvalidOperators(): array;
/**
* @return Collection
*/
@@ -42,11 +47,6 @@ interface SearchInterface
*/
public function getOperators(): Collection;
/**
* @return array
*/
public function getInvalidOperators(): array;
/**
* @return string
*/