feat: Warnung, wenn lokale Werte ein zugewiesenes Preset überdecken
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 5.5
parent
be6ca5bee0
commit
1f9b50f1a6
@@ -247,21 +247,24 @@ final class ComposeFixture
|
||||
|
||||
/**
|
||||
* PresetAssignment as the live wiring builds it: the book is $book (default: bookOf($design), else of the sample
|
||||
* design system), the id check is the cleaner's keepsId().
|
||||
* design system), the id check is the cleaner's keepsId(). $load replaces $book with a loader the test can
|
||||
* count.
|
||||
*
|
||||
* @param (Closure(string): array<string, string>)|null $groupsOf
|
||||
* @param (Closure(): PresetBook)|null $load
|
||||
*/
|
||||
public static function presetAssignment(
|
||||
?PresetBook $book = null,
|
||||
?Closure $groupsOf = null,
|
||||
?DesignSystem $design = null,
|
||||
?ValueCleaner $cleaner = null
|
||||
?ValueCleaner $cleaner = null,
|
||||
?Closure $load = null
|
||||
): PresetAssignment {
|
||||
$book ??= self::bookOf($design ?? DiviFixtures::designSystem());
|
||||
$cleaner ??= self::cleaner();
|
||||
|
||||
return new PresetAssignment(
|
||||
static fn (): PresetBook => $book,
|
||||
$load ?? static fn (): PresetBook => $book,
|
||||
$groupsOf ?? static fn (string $module): array => [],
|
||||
$cleaner->keepsId(...)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user