Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
Анатолий Нехай committed Aug 17, 2022
1 parent b43de67 commit f5f31a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ final public static function cases(): array
*
* @return static|null
*/
final public static function tryFrom($value): ?static
final public static function tryFrom($value)
{
foreach (self::cases() as $case) {
if ($case->value == $value) {
Expand All @@ -149,7 +149,7 @@ final public static function tryFrom($value): ?static
*
* @throws RuntimeException
*/
final public static function __callStatic(string $name, array $arguments = []): static
final public static function __callStatic(string $name, array $arguments = [])
{
foreach (self::cases() as $case) {
if ($case->name === $name) {
Expand All @@ -163,6 +163,7 @@ final public static function __callStatic(string $name, array $arguments = []):
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->value;
Expand Down

0 comments on commit f5f31a4

Please sign in to comment.