TenantAtlas/apps/platform/app/Support/Artifacts/ArtifactProviderDetail.php
Ahmed Darrazi bf8d59e034
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m36s
feat: implement provider-neutral artifact source taxonomy
2026-05-09 01:45:12 +02:00

54 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Support\Artifacts;
use Illuminate\Contracts\Support\Arrayable;
use JsonSerializable;
/**
* @implements Arrayable<string, mixed>
*/
final readonly class ArtifactProviderDetail implements Arrayable, JsonSerializable
{
public function __construct(
public ?string $legacyFindingType = null,
public ?string $legacyReportType = null,
public ?string $legacyPolicyType = null,
public ?string $providerObjectType = null,
public ?string $providerDisplayType = null,
public ?string $detectorDetail = null,
) {}
/**
* @return array{
* legacy_finding_type: ?string,
* legacy_report_type: ?string,
* legacy_policy_type: ?string,
* provider_object_type: ?string,
* provider_display_type: ?string,
* detector_detail: ?string
* }
*/
public function toArray(): array
{
return [
'legacy_finding_type' => $this->legacyFindingType,
'legacy_report_type' => $this->legacyReportType,
'legacy_policy_type' => $this->legacyPolicyType,
'provider_object_type' => $this->providerObjectType,
'provider_display_type' => $this->providerDisplayType,
'detector_detail' => $this->detectorDetail,
];
}
/**
* @return array<string, mixed>
*/
public function jsonSerialize(): array
{
return $this->toArray();
}
}