code quality + param-name fixes

This commit is contained in:
paulwer 2023-01-30 11:13:44 +01:00
parent cccf7a3cc2
commit ae5b9c0dd4
5 changed files with 13 additions and 13 deletions

View File

@ -26,7 +26,7 @@ class BankIntegrationFilters extends QueryFilters
*/ */
public function name(string $name = ''): Builder public function name(string $name = ''): Builder
{ {
if (strlen($filter) == 0) { if (strlen($name) == 0) {
return $this->builder; return $this->builder;
} }

View File

@ -27,7 +27,7 @@ class BankTransactionFilters extends QueryFilters
*/ */
public function name(string $name = ''): Builder public function name(string $name = ''): Builder
{ {
if (strlen($filter) == 0) { if (strlen($name) == 0) {
return $this->builder; return $this->builder;
} }

View File

@ -30,7 +30,7 @@ class BankTransactionRuleFilters extends QueryFilters
*/ */
public function name(string $name = ''): Builder public function name(string $name = ''): Builder
{ {
if (strlen($filter) == 0) { if (strlen($name) == 0) {
return $this->builder; return $this->builder;
} }

View File

@ -30,7 +30,7 @@ class ClientFilters extends QueryFilters
*/ */
public function name(string $name = ''): Builder public function name(string $name = ''): Builder
{ {
if (strlen($filter) == 0) { if (strlen($name) == 0) {
return $this->builder; return $this->builder;
} }

View File

@ -62,6 +62,15 @@ class PaymentFilters extends QueryFilters
return $this->builder; return $this->builder;
} }
public function number(string $number = ''): Builder
{
if (strlen($number) == 0) {
return $this->builder;
}
return $this->builder->where('number', $number);
}
/** /**
* Sorts the list based on $sort. * Sorts the list based on $sort.
* *
@ -79,15 +88,6 @@ class PaymentFilters extends QueryFilters
return $this->builder->orderBy($sort_col[0], $sort_col[1]); return $this->builder->orderBy($sort_col[0], $sort_col[1]);
} }
public function number(string $number = ''): Builder
{
if (strlen($number) == 0) {
return $this->builder;
}
return $this->builder->where('number', $number);
}
/** /**
* Filters the query by the users company ID. * Filters the query by the users company ID.
* *