## Summary - add a shared backup-quality resolver and summary model for backup sets, backup items, policy versions, and restore selection - surface backup-quality truth across Filament backup-set, policy-version, and restore-wizard entry points - add focused Pest coverage and the full Spec Kit artifact set for spec 176 ## Testing - focused backup-quality verification and integrated-browser smoke coverage were completed during implementation - degraded browser smoke path was validated with temporary seeded records and then cleaned up again - the workspace already has a prior `vendor/bin/sail artisan test --compact` run exiting non-zero; that full-suite failure was not reworked as part of this PR Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #211
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\BackupQuality;
|
|
|
|
final readonly class BackupQualitySummary
|
|
{
|
|
/**
|
|
* @param list<string> $degradationFamilies
|
|
* @param list<string> $qualityHighlights
|
|
*/
|
|
public function __construct(
|
|
public string $kind,
|
|
public string $snapshotMode,
|
|
public int $totalItems,
|
|
public int $degradedItemCount,
|
|
public int $metadataOnlyCount,
|
|
public int $assignmentIssueCount,
|
|
public int $orphanedAssignmentCount,
|
|
public int $integrityWarningCount,
|
|
public int $unknownQualityCount,
|
|
public bool $hasAssignmentIssues,
|
|
public bool $hasOrphanedAssignments,
|
|
public ?string $assignmentCaptureReason,
|
|
public ?string $integrityWarning,
|
|
public array $degradationFamilies,
|
|
public array $qualityHighlights,
|
|
public string $compactSummary,
|
|
public string $summaryMessage,
|
|
public string $nextAction,
|
|
public string $positiveClaimBoundary,
|
|
) {}
|
|
|
|
public function hasDegradations(): bool
|
|
{
|
|
return $this->degradationFamilies !== [];
|
|
}
|
|
|
|
public function hasIntegrityWarning(): bool
|
|
{
|
|
return $this->integrityWarning !== null;
|
|
}
|
|
}
|