Skip to content

Commit ea35b65

Browse files
check type of enumerations class
1 parent 3eec06c commit ea35b65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Enum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __toString()
8282
*/
8383
final public function equals(Enum $enum)
8484
{
85-
return $this->getValue() === $enum->getValue();
85+
return $this->getValue() === $enum->getValue() && get_called_class() == get_class($enum);
8686
}
8787

8888
/**

0 commit comments

Comments
 (0)