Skip to content

Commit

Permalink
Improved static analysis support for ::make
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Apr 8, 2019
1 parent bb08449 commit 39eeee0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `enum` will be documented in this file

## 2.0.1 - 2019-04-08

- Improved static analysis support for `::make`

## 2.0.0 - 2019-04-01

A full major rework of the `Enum` class - we try to list all changes, for more details you can check out the [PR](https://github.com/spatie/enum/pull/18) and the [Issue](https://github.com/spatie/enum/issues/10).
Expand Down
5 changes: 5 additions & 0 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ public function jsonSerialize()
return $this->getValue();
}

/**
* @param int|string $value
*
* @return static
*/
public static function make($value): Enumerable
{
if (! is_int($value) && ! is_string($value)) {
Expand Down

0 comments on commit 39eeee0

Please sign in to comment.