Skip to content

Commit

Permalink
Merge pull request #11 from gjm/master
Browse files Browse the repository at this point in the history
Fixed fromValue() on subclasses
  • Loading branch information
thunderer authored Apr 10, 2020
2 parents e807702 + b88b98f commit b334597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Enum/EnumTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ final public static function fromValue($value): self
return static::$instances[$class][$name];
}

return static::$instances[$class][$name] = new self($name, static::$members[$class][$name]);
return static::$instances[$class][$name] = new static($name, static::$members[$class][$name]);
}

final public static function fromEnum($enum): self
Expand Down

0 comments on commit b334597

Please sign in to comment.