This repository was archived by the owner on Mar 18, 2021. It is now read-only.
This new release adds the method ->equals(Enum $enum) to the Enum class, which will compare the enum values, but also the enum types.
<?php
use SimpleEnum\Enum;
class Foo extends Enum { const foo = 1; }
class Bar extends Enum { const bar = 1; }
$foo = new Foo(1);
$bar = new Bar(1);
assert(!$foo->equals($bar));