Skip to content

Commit

Permalink
Merge pull request #55 from GaryJones/patch-1
Browse files Browse the repository at this point in the history
Documentation: Clarify is() usage
  • Loading branch information
marc-mabe committed Dec 8, 2015
2 parents ef6895b + 61d0ebf commit 6dc1be9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -63,10 +63,11 @@ It's an abstract class that needs to be extended to use it.
UserStatus::get(UserStatus::DELETED) != UserStatus::INACTIVE()

// simplified way to compare two enumerators
UserStatus::ACTIVE()->is(UserStatus::ACTIVE); // true
UserStatus::ACTIVE()->is(UserStatus::ACTIVE()); // true
UserStatus::ACTIVE()->is(UserStatus::DELETED); // false
UserStatus::ACTIVE()->is(UserStatus::DELETED()); // false
$status = UserStatus::ACTIVE();
$status->is(UserStatus::ACTIVE); // true
$status->is(UserStatus::ACTIVE()); // true
$status->is(UserStatus::DELETED); // false
$status->is(UserStatus::DELETED()); // false
```

## Type-Hint
Expand Down

0 comments on commit 6dc1be9

Please sign in to comment.