$case->name, $cases); } public static function getValues(): array { $cases = self::cases(); return array_map(static fn(UnitEnum $case) => $case->value, $cases); } public static function getGroups(): array { $filter = static fn (string $starts_with) => array_filter(self::cases(), fn (SlotKey $case) => str_starts_with($case->name, $starts_with) ); return [ 'PCI Express' => $filter('PCIE_'), 'AGP' => [ self::AGP_UNIVERSAL, self::AGP_33V, self::AGP_15V, ], 'PCI 32-bit' => [ self::PCI_UNIVERSAL, self::PCI_5V, self::PCI_33V, ], 'PCI 64-bit' => [ self::PCI_X, self::PCI_64_UNIVERSAL, self::PCI_64_33V, self::PCI_64_5V, ], 'ISA' => [ self::ISA_16, self::ISA_8, self::ISA_VLB, ] ]; } }