Clean up code.

This commit is contained in:
James Cole
2020-10-23 19:11:25 +02:00
parent 0845e1cb7d
commit 8dbd785ab8
57 changed files with 84 additions and 441 deletions

View File

@@ -31,18 +31,6 @@ use Log;
*/
class BudgetLimitTransformer extends AbstractTransformer
{
/**
* CurrencyTransformer constructor.
*
* @codeCoverageIgnore
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
}
/**
* Transform the note.
*
@@ -68,7 +56,7 @@ class BudgetLimitTransformer extends AbstractTransformer
$currencyDecimalPlaces = $currency->decimal_places;
}
$amount = number_format((float) $amount, $currencyDecimalPlaces, '.', '');
$data = [
return [
'id' => (int) $budgetLimit->id,
'created_at' => $budgetLimit->created_at->toAtomString(),
'updated_at' => $budgetLimit->updated_at->toAtomString(),
@@ -88,7 +76,5 @@ class BudgetLimitTransformer extends AbstractTransformer
],
],
];
return $data;
}
}