Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 14:24:37 +01:00
parent f53923f16c
commit f52675068b
151 changed files with 251 additions and 403 deletions

View File

@@ -131,8 +131,7 @@ class AccountTransformer extends AbstractTransformer
// get currencies:
$accountIds = $objects->pluck('id')->toArray();
$meta = AccountMeta
::whereIn('account_id', $accountIds)
$meta = AccountMeta::whereIn('account_id', $accountIds)
->where('name', 'currency_id')
->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data']);
$currencyIds = $meta->pluck('data')->toArray();

View File

@@ -48,7 +48,7 @@ class BudgetLimitTransformer extends AbstractTransformer
*/
public function includeBudget(BudgetLimit $limit)
{
return $this->item($limit->budget, new BudgetTransformer, 'budgets');
return $this->item($limit->budget, new BudgetTransformer(), 'budgets');
}
/**

View File

@@ -47,7 +47,6 @@ class PreferenceTransformer extends AbstractTransformer
'name' => $preference->name,
'data' => $preference->data,
];
}
/**

View File

@@ -260,7 +260,7 @@ class TransactionGroupTransformer extends AbstractTransformer
*/
private function date(?string $string): ?Carbon
{
if(null === $string) {
if (null === $string) {
return null;
}
return Carbon::createFromFormat('Y-m-d', $string);