src/precore/lang/Enum.php
public function equals(ObjectInterface $object = null) : bool
    {
        return $object instanceof static && $object->name === $this->name;
    }
public function equals(ObjectInterface $object = null) : bool
    {
        return $object instanceof static && $object->name === $this->name;
    }
The type and the name equality is being checked. Although the reference should be the same,
it can differ if one of the two objects have been deserialized.

@param ObjectInterface $object
@return bool