Skip to content

Commit 6f8473c

Browse files
author
Mikhail Yarmoluk
committed
Fix getting attribute in key method
1 parent 2bb3e38 commit 6f8473c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Enum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static function keys(): array
6969
*/
7070
public static function get($key): ?string
7171
{
72-
$key = \is_object($key) ? $key->{self::$attribute} : $key;
72+
$key = \is_object($key) ? $key->{static::$attribute} : $key;
7373

7474
return static::all()[$key] ?? static::getDefault();
7575
}

0 commit comments

Comments
 (0)