Skip to content

Commit

Permalink
chore: fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson authored and github-actions[bot] committed Aug 21, 2024
1 parent d0b5d29 commit 1b4fb5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/Base/Traits/HasTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function translate($attribute, $locale = null)
/**
* Translate a value from attribute data.
*/
public function translateAttribute(string $attribute, string $locale = null): mixed
public function translateAttribute(string $attribute, ?string $locale = null): mixed
{
$field = Arr::get($this->getAttribute('attribute_data'), $attribute);

Expand Down Expand Up @@ -71,7 +71,7 @@ public function translateAttribute(string $attribute, string $locale = null): mi
return $field->getValue();
}

if (!$value->getValue()) {
if (! $value->getValue()) {
return $translations->first(
fn ($value) => $value->getValue()
)?->getValue();
Expand Down

0 comments on commit 1b4fb5c

Please sign in to comment.