Skip to content

Commit

Permalink
Added the 'equalsTo' method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael v/d Rijt committed Oct 15, 2015
1 parent a93449b commit 1daad5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ public function getKey()
return static::search($this->value);
}

/**
* Check if enum is equal to
*
* @param $enum
*
* @return bool
*/
public function equalsTo($enum)
{
return $this === $enum;
}

/**
* @return string
*/
Expand Down

0 comments on commit 1daad5c

Please sign in to comment.