mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
EnumTrait: use a better method to initialize enums
this method is simpler, and is also safe at the native type level. Coincidentally, it also eliminates 30 PHPStan false-positives.
This commit is contained in:
@ -41,14 +41,14 @@ final class NoteInstrument{
|
||||
__construct as Enum___construct;
|
||||
}
|
||||
|
||||
protected static function setup() : iterable{
|
||||
return [
|
||||
protected static function setup() : void{
|
||||
self::registerAll(
|
||||
new self("piano", 0),
|
||||
new self("bass_drum", 1),
|
||||
new self("snare", 2),
|
||||
new self("clicks_and_sticks", 3),
|
||||
new self("double_bass", 4)
|
||||
];
|
||||
);
|
||||
}
|
||||
|
||||
/** @var int */
|
||||
|
Reference in New Issue
Block a user