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,17 +31,6 @@ use Log;
*/
class CurrencyTransformer 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 currency.
@@ -57,7 +46,7 @@ class CurrencyTransformer extends AbstractTransformer
if (null !== $defaultCurrency) {
$isDefault = (int) $defaultCurrency->id === (int) $currency->id;
}
$data = [
return [
'id' => (int) $currency->id,
'created_at' => $currency->created_at->toAtomString(),
'updated_at' => $currency->updated_at->toAtomString(),
@@ -74,7 +63,5 @@ class CurrencyTransformer extends AbstractTransformer
],
],
];
return $data;
}
}