Various PSR12 code cleanup

This commit is contained in:
James Cole
2022-12-29 19:42:40 +01:00
parent 6cfdc58cb1
commit 56b9b66352
38 changed files with 763 additions and 691 deletions

View File

@@ -33,7 +33,7 @@ class CurrencyTransformer extends AbstractTransformer
/**
* Transform the currency.
*
* @param TransactionCurrency $currency
* @param TransactionCurrency $currency
*
* @return array
*/
@@ -42,11 +42,11 @@ class CurrencyTransformer extends AbstractTransformer
$isDefault = false;
$defaultCurrency = $this->parameters->get('defaultCurrency');
if (null !== $defaultCurrency) {
$isDefault = (int) $defaultCurrency->id === (int) $currency->id;
$isDefault = (int)$defaultCurrency->id === (int)$currency->id;
}
return [
'id' => (int) $currency->id,
'id' => (int)$currency->id,
'created_at' => $currency->created_at->toAtomString(),
'updated_at' => $currency->updated_at->toAtomString(),
'default' => $isDefault,
@@ -54,11 +54,11 @@ class CurrencyTransformer extends AbstractTransformer
'name' => $currency->name,
'code' => $currency->code,
'symbol' => $currency->symbol,
'decimal_places' => (int) $currency->decimal_places,
'decimal_places' => (int)$currency->decimal_places,
'links' => [
[
'rel' => 'self',
'uri' => '/currencies/' . $currency->id,
'uri' => '/currencies/'.$currency->id,
],
],
];