> */ public array $supportedPolicyTypes = []; /** * @var array> */ public array $foundationTypes = []; public function mount(): void { $resolver = app(CoverageCapabilitiesResolver::class); $this->supportedPolicyTypes = collect(InventoryPolicyTypeMeta::supported()) ->map(function (array $row) use ($resolver): array { $type = (string) ($row['type'] ?? ''); return array_merge($row, [ 'dependencies' => $type !== '' && $resolver->supportsDependencies($type), ]); }) ->all(); $this->foundationTypes = collect(InventoryPolicyTypeMeta::foundations()) ->map(function (array $row): array { return array_merge($row, [ 'dependencies' => false, ]); }) ->all(); } }