Skip to content

Commit 809778c

Browse files
author
Marc Bennewitz
committed
Update README.md
1 parent f7827b3 commit 809778c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ It's an abstract class that needs to be extended to use it.
6161
UserStatus::get(UserStatus::ACTIVE) === UserStatus::ACTIVE()
6262
UserStatus::get(UserStatus::DELETED) != UserStatus::INACTIVE()
6363

64+
// simplified way to compare two enumerations
65+
UserStatus::ACTIVE()->is(UserStatus::ACTIVE); // true
66+
UserStatus::ACTIVE()->is(UserStatus::ACTIVE()); // true
67+
UserStatus::ACTIVE()->is(UserStatus::DELETED); // false
68+
UserStatus::ACTIVE()->is(UserStatus::DELETED()); // false
69+
6470

6571
## Type-Hint
6672

0 commit comments

Comments
 (0)