Level 7 yay!

This commit is contained in:
James Cole
2025-01-04 19:43:58 +01:00
parent 1aa8ebe57f
commit 0f69e0d672
27 changed files with 76 additions and 76 deletions

View File

@@ -107,7 +107,7 @@ class AccountRepository implements AccountRepositoryInterface
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
->where('accounts.active', true)
->where(
static function (EloquentBuilder $q1) use ($number): void { // @phpstan-ignore-line
static function (EloquentBuilder $q1) use ($number): void {
$json = json_encode($number);
$q1->where('account_meta.name', '=', 'account_number');
$q1->where('account_meta.data', '=', $json);
@@ -188,7 +188,7 @@ class AccountRepository implements AccountRepositoryInterface
{
$query = $this->user->accounts()->with(
[ // @phpstan-ignore-line
'accountmeta' => static function (HasMany $query): void { // @phpstan-ignore-line
'accountmeta' => static function (HasMany $query): void {
$query->where('name', 'account_role');
},
'attachments',
@@ -260,7 +260,7 @@ class AccountRepository implements AccountRepositoryInterface
{
$query = $this->user->accounts()->with(
[ // @phpstan-ignore-line
'accountmeta' => static function (HasMany $query): void { // @phpstan-ignore-line
'accountmeta' => static function (HasMany $query): void {
$query->where('name', 'account_role');
},
]
@@ -617,7 +617,7 @@ class AccountRepository implements AccountRepositoryInterface
foreach ($parts as $part) {
$search = sprintf('%%%s%%', $part);
$dbQuery->where(
static function (EloquentBuilder $q1) use ($search): void { // @phpstan-ignore-line
static function (EloquentBuilder $q1) use ($search): void {
$q1->whereLike('accounts.iban', $search);
$q1->orWhere(
static function (EloquentBuilder $q2) use ($search): void {