Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphjsmit committed Jan 12, 2023
1 parent f5859eb commit 0ea419e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ protected function setEnumCastableAttribute($key, $value)
$this->attributes[$key] = $this->getStorableEnumValue($value);
} else {
$this->attributes[$key] = $this->getStorableEnumValue(
$this->getEnumCaseFromValue($enumClass, $value)
$this->getEnumCaseFromValue($enumClass, $value)
);
}
}
Expand Down Expand Up @@ -1238,8 +1238,8 @@ protected function getEnumCaseFromValue($enumClass, $value)
protected function getStorableEnumValue($value)
{
return $value instanceof BackedEnum
? $value->value
: $value->name;
? $value->value
: $value->name;
}

/**
Expand All @@ -1251,7 +1251,7 @@ protected function getStorableEnumValue($value)
protected function getStorableEnumArrayValue($value)
{
return json_encode(
array_map(fn ($value) => $this->getStorableEnumValue($value), $value)
array_map(fn ($value) => $this->getStorableEnumValue($value), $value)
);
}

Expand Down

0 comments on commit 0ea419e

Please sign in to comment.