Skip to content

Commit 3ed6404

Browse files
committed
PHPStan "Access to private static property $instances"
1 parent 45f5944 commit 3ed6404

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/EnumSerializableTrait.php

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ public function __unserialize(array $data): void
6969
$class = static::class;
7070
$enumerator = $this;
7171
$closure = function () use ($class, $name, $value, $enumerator) {
72+
\assert(self::class === Enum::class);
73+
7274
if ($value !== null && $this->value !== null) {
7375
throw new LogicException('Do not call this directly - please use unserialize($enum) instead');
7476
}

0 commit comments

Comments
 (0)