Skip to content

Commit d4661ad

Browse files
committed
Simplify getReflectionProperty
1 parent 8c8be70 commit d4661ad

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Enum.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,9 @@ private static function getReflection(): ReflectionClass
234234

235235
private static function getReflectionProperty(string $property): ReflectionProperty
236236
{
237+
self::getReflection();
237238
$class = static::class;
238239

239-
if ((self::$properties[$class][$property] ?? null) instanceof ReflectionProperty) {
240-
self::getReflection();
241-
}
242-
243240
return self::$properties[$class][$property];
244241
}
245242

0 commit comments

Comments
 (0)