refactor: ReleaseGate::invalidate() als einzige Stelle zum Zurücksetzen des Freigabe-Zustands; CompatibilityMatrix::locked() und ReleaseGate::lockOf() ersetzen die drei Kopien der Sperrprüfung
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7f9a087b8b
commit
63389f35a8
@@ -76,6 +76,27 @@ final class CompatibilityMatrix
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The statuses of those of $features that are not usable – each once, in the order of $features. The one answer
|
||||
* to "what locks this call" for the gate (DiviFeatureGate), the adapters (ReleaseGate::assertFeatures()) and the
|
||||
* refusal (ReleaseStatus::refusalFor()).
|
||||
*
|
||||
* @param list<DiviFeature> $features
|
||||
* @return list<FeatureStatus>
|
||||
*/
|
||||
public function locked(array $features): array
|
||||
{
|
||||
$locked = [];
|
||||
foreach ($features as $feature) {
|
||||
$status = $this->of($feature);
|
||||
if (! $status->usable()) {
|
||||
$locked[$feature->value] = $status;
|
||||
}
|
||||
}
|
||||
|
||||
return array_values($locked);
|
||||
}
|
||||
|
||||
/** @return list<FeatureStatus> */
|
||||
public function unusable(): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user