*/ use IntSaveIdMapTrait; private function __construct(){ foreach(NoteInstrument::cases() as $case){ $this->register(match($case){ NoteInstrument::PIANO => 0, NoteInstrument::BASS_DRUM => 1, NoteInstrument::SNARE => 2, NoteInstrument::CLICKS_AND_STICKS => 3, NoteInstrument::DOUBLE_BASS => 4, NoteInstrument::FLUTE => 5, NoteInstrument::BELL => 6, NoteInstrument::GUITAR => 7, NoteInstrument::CHIME => 8, NoteInstrument::XYLOPHONE => 9, NoteInstrument::IRON_XYLOPHONE => 10, NoteInstrument::COW_BELL => 11, NoteInstrument::DIDGERIDOO => 12, NoteInstrument::BIT => 13, NoteInstrument::BANJO => 14, NoteInstrument::PLING => 15, }, $case); } } }