diff --git a/src/pocketmine/block/utils/DyeColor.php b/src/pocketmine/block/utils/DyeColor.php index 122403e95..3540d62a3 100644 --- a/src/pocketmine/block/utils/DyeColor.php +++ b/src/pocketmine/block/utils/DyeColor.php @@ -57,7 +57,7 @@ final class DyeColor{ /** @var DyeColor[] */ private static $numericIdMap = []; - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new DyeColor("white", "White", 0, new Color(0xf0, 0xf0, 0xf0)), new DyeColor("orange", "Orange", 1, new Color(0xf9, 0x80, 0x1d)), diff --git a/src/pocketmine/block/utils/SkullType.php b/src/pocketmine/block/utils/SkullType.php index 305573788..b53e974b7 100644 --- a/src/pocketmine/block/utils/SkullType.php +++ b/src/pocketmine/block/utils/SkullType.php @@ -46,7 +46,7 @@ final class SkullType{ /** @var SkullType[] */ private static $numericIdMap = []; - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new SkullType("skeleton", "Skeleton Skull", 0), new SkullType("wither_skeleton", "Wither Skeleton Skull", 1), diff --git a/src/pocketmine/block/utils/SlabType.php b/src/pocketmine/block/utils/SlabType.php index 53550520f..15035637e 100644 --- a/src/pocketmine/block/utils/SlabType.php +++ b/src/pocketmine/block/utils/SlabType.php @@ -37,7 +37,7 @@ use pocketmine\utils\EnumTrait; final class SlabType{ use EnumTrait; - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new self("bottom"), new self("top"), diff --git a/src/pocketmine/block/utils/TreeType.php b/src/pocketmine/block/utils/TreeType.php index 36183d396..8e0622dd6 100644 --- a/src/pocketmine/block/utils/TreeType.php +++ b/src/pocketmine/block/utils/TreeType.php @@ -46,7 +46,7 @@ final class TreeType{ /** @var TreeType[] */ private static $numericIdMap = []; - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new TreeType("oak", "Oak", 0), new TreeType("spruce", "Spruce", 1), diff --git a/src/pocketmine/item/ItemUseResult.php b/src/pocketmine/item/ItemUseResult.php index 3341d9161..7f8bdba01 100644 --- a/src/pocketmine/item/ItemUseResult.php +++ b/src/pocketmine/item/ItemUseResult.php @@ -37,7 +37,7 @@ use pocketmine\utils\EnumTrait; final class ItemUseResult{ use EnumTrait; - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new self("none"), new self("fail"), diff --git a/src/pocketmine/player/GameMode.php b/src/pocketmine/player/GameMode.php index 33a37fc80..b294dd5ae 100644 --- a/src/pocketmine/player/GameMode.php +++ b/src/pocketmine/player/GameMode.php @@ -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"]), diff --git a/src/pocketmine/plugin/PluginLoadOrder.php b/src/pocketmine/plugin/PluginLoadOrder.php index ebca6528b..8e27befcf 100644 --- a/src/pocketmine/plugin/PluginLoadOrder.php +++ b/src/pocketmine/plugin/PluginLoadOrder.php @@ -36,7 +36,7 @@ use pocketmine\utils\EnumTrait; final class PluginLoadOrder{ use EnumTrait; - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new self("startup"), new self("postworld") diff --git a/src/pocketmine/utils/EnumTrait.php b/src/pocketmine/utils/EnumTrait.php index 994b05f9d..a93358023 100644 --- a/src/pocketmine/utils/EnumTrait.php +++ b/src/pocketmine/utils/EnumTrait.php @@ -54,9 +54,9 @@ trait EnumTrait{ * * (This ought to be private, but traits suck too much for that.) * - * @return self[] + * @return self[]|iterable */ - abstract protected static function setup() : array; + abstract protected static function setup() : iterable; /** * @internal Lazy-inits the enum if necessary. diff --git a/src/pocketmine/world/sound/NoteInstrument.php b/src/pocketmine/world/sound/NoteInstrument.php index a36c46f14..622333367 100644 --- a/src/pocketmine/world/sound/NoteInstrument.php +++ b/src/pocketmine/world/sound/NoteInstrument.php @@ -41,7 +41,7 @@ class NoteInstrument{ __construct as Enum___construct; } - protected static function setup() : array{ + protected static function setup() : iterable{ return [ new self("piano", 0), new self("bass_drum", 1),