## Summary Implements Spec 284 for provider-neutral artifact source taxonomy. - add shared artifact source descriptor, resolver, taxonomy, and provider-detail support - update findings, evidence snapshots, stored reports, inventory items, and tenant review surfaces to disclose descriptor-first artifact summaries - add bounded Pest unit, feature, guard, and browser coverage for the taxonomy slice - include the completed Spec 284 package artifacts under `specs/284-provider-neutral-artifact-source-taxonomy/` ## Notes - branch: `284-provider-neutral-artifact-source-taxonomy` - commit: `bf8d59e0` - this PR was created as part of the requested commit/push/PR flow against `platform-dev` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #343
54 lines
1.5 KiB
PHP
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();
|
|
}
|
|
}
|