Skip to content

Commit

Permalink
Final tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Ullyott <[email protected]>
  • Loading branch information
Orrison committed Oct 23, 2024
1 parent 9b16a1f commit aa942fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function mutateFormDataBeforeFill(array $data): array
{
$settings = app(static::getSettings());

$data['estimated_average_revenue'] = $settings->estimated_average_revenue->formatByDecimal();
$data['estimated_average_revenue'] = $settings->estimated_average_revenue?->formatByDecimal();

return $data;
}
Expand Down
4 changes: 2 additions & 2 deletions app/DataTransferObjects/Casts/MoneySettingCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public function get($payload): ?Money
return null;
}

$value = intval($payload['value']) ?? null;
$value = $payload['value'] ?? null;
$currency = $payload['currency'] ?? null;

if (blank($value) || blank($currency) || ! is_int($value) || ! is_string($currency)) {
if (blank($value) || blank($currency)) {
return null;
}

Expand Down

0 comments on commit aa942fe

Please sign in to comment.