allow use of any iterable for enum initialization

this allows possible use of generators
This commit is contained in:
Dylan K. Taylor
2019-06-25 19:37:31 +01:00
parent 44b7239847
commit a6395c9ac7
9 changed files with 10 additions and 10 deletions

View File

@ -47,7 +47,7 @@ final class GameMode{
/** @var self[] */
protected static $magicNumberMap = [];
protected static function setup() : array{
protected static function setup() : iterable{
return [
new self("survival", 0, "Survival", "gameMode.survival", ["s", "0"]),
new self("creative", 1, "Creative", "gameMode.creative", ["c", "1"]),