34 lines
1.2 KiB
PHP
34 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\Baselines\Compare;
|
|
|
|
use App\Models\Tenant;
|
|
use App\Services\Baselines\Evidence\ResolvedEvidence;
|
|
|
|
interface CompareStrategy
|
|
{
|
|
public function key(): CompareStrategyKey;
|
|
|
|
/**
|
|
* @return list<CompareStrategyCapability>
|
|
*/
|
|
public function capabilities(): array;
|
|
|
|
/**
|
|
* @param array<string, array{subject_type: string, subject_external_id: string, subject_key: string, policy_type: string, baseline_hash: string, meta_jsonb: array<string, mixed>}> $baselineItems
|
|
* @param array<string, array{subject_external_id: string, subject_key: string, policy_type: string, meta_jsonb: array<string, mixed>}> $currentItems
|
|
* @param array<string, ResolvedEvidence|null> $resolvedCurrentEvidence
|
|
* @param array<string, string> $severityMapping
|
|
* @return array{subject_results: list<CompareSubjectResult>, diagnostics: array<string, mixed>}
|
|
*/
|
|
public function compare(
|
|
CompareOrchestrationContext $context,
|
|
Tenant $tenant,
|
|
array $baselineItems,
|
|
array $currentItems,
|
|
array $resolvedCurrentEvidence,
|
|
array $severityMapping,
|
|
): array;
|
|
} |