@@ -14,7 +14,7 @@ final class ProcessResult
1414 /**
1515 * @param SystemError[] $systemErrors
1616 * @param FileDiff[] $fileDiffs
17- * @param string[] $usedSkips
17+ * @param array< string, string[]> $usedSkips
1818 */
1919 public function __construct (
2020 private array $ systemErrors ,
@@ -24,7 +24,11 @@ public function __construct(
2424 ) {
2525 Assert ::allIsInstanceOf ($ systemErrors , SystemError::class);
2626 Assert ::allIsInstanceOf ($ fileDiffs , FileDiff::class);
27- Assert ::allString ($ usedSkips );
27+
28+ Assert ::allString (array_keys ($ usedSkips ));
29+ foreach ($ usedSkips as $ usedSkip ) {
30+ Assert ::allString ($ usedSkip );
31+ }
2832 }
2933
3034 /**
@@ -62,13 +66,16 @@ public function addSystemErrors(array $systemErrors): void
6266 * their result from worker processes only. Merge those main-process marks back in, or they would
6367 * be wrongly reported as unused.
6468 *
65- * @param string[] $usedSkips
69+ * @param array< string, string[]> $usedSkips
6670 */
6771 public function addUsedSkips (array $ usedSkips ): void
6872 {
69- Assert ::allString ($ usedSkips );
73+ foreach ($ usedSkips as $ skip => $ paths ) {
74+ Assert ::allString ($ paths );
7075
71- $ this ->usedSkips = array_values (array_unique ([...$ this ->usedSkips , ...$ usedSkips ]));
76+ $ existingPaths = $ this ->usedSkips [$ skip ] ?? [];
77+ $ this ->usedSkips [$ skip ] = array_values (array_unique ([...$ existingPaths , ...$ paths ]));
78+ }
7279 }
7380
7481 public function getTotalChanged (): int
@@ -77,7 +84,7 @@ public function getTotalChanged(): int
7784 }
7885
7986 /**
80- * @return string[]
87+ * @return array< string, string[]>
8188 */
8289 public function getUsedSkips (): array
8390 {
0 commit comments