protected function collectConflictsBetween(
        ComparisonContext $context,
        array $fieldMapA,
        array $fieldMapB,
        bool $parentFieldsAreMutuallyExclusive
    ): void {
        // A field map is a keyed collection, where each key represents a response
        // name and the value at that key is a list of all fields which provide that
        // response name. For any response name which appears in both provided field
        // maps, each field from the first field map must be compared to every field
        // in the second field map to find potential conflicts.
        foreach ($fieldMapA as $responseName => $fieldsA) {
            $fieldsB = $fieldMapB[$responseName] ?? null;

            if (null !== $fieldsB) {
                $fieldsACount = \count($fieldsA);
                $fieldsBCount = \count($fieldsB);
                /** @noinspection ForeachInvariantsInspection */
                for ($i = 0; $i < $fieldsACount; $i++) {
                    /** @noinspection ForeachInvariantsInspection */
                    for ($j = 0; $j < $fieldsBCount; $j++) {
                        $conflict = $this->findConflict(
                            $responseName,
                            $fieldsA[$i],
                            $fieldsB[$j],
                            $parentFieldsAreMutuallyExclusive
                        );

                        if (null !== $conflict) {
                            $context->reportConflict($conflict);
                        }
                    }
                }
            }
        }
    }
protected function collectConflictsBetween(
        ComparisonContext $context,
        array $fieldMapA,
        array $fieldMapB,
        bool $parentFieldsAreMutuallyExclusive
    ): void {
        // A field map is a keyed collection, where each key represents a response
        // name and the value at that key is a list of all fields which provide that
        // response name. For any response name which appears in both provided field
        // maps, each field from the first field map must be compared to every field
        // in the second field map to find potential conflicts.
        foreach ($fieldMapA as $responseName => $fieldsA) {
            $fieldsB = $fieldMapB[$responseName] ?? null;

            if (null !== $fieldsB) {
                $fieldsACount = \count($fieldsA);
                $fieldsBCount = \count($fieldsB);
                /** @noinspection ForeachInvariantsInspection */
                for ($i = 0; $i < $fieldsACount; $i++) {
                    /** @noinspection ForeachInvariantsInspection */
                    for ($j = 0; $j < $fieldsBCount; $j++) {
                        $conflict = $this->findConflict(
                            $responseName,
                            $fieldsA[$i],
                            $fieldsB[$j],
                            $parentFieldsAreMutuallyExclusive
                        );

                        if (null !== $conflict) {
                            $context->reportConflict($conflict);
                        }
                    }
                }
            }
        }
    }
protected function collectConflictsBetween ( ComparisonContext $ context , array $ fieldMapA , array $ fieldMapB , bool $ parentFieldsAreMutuallyExclusive ) : void { // A field map is a keyed collection, where each key represents a response // name and the value at that key is a list of all fields which provide that // response name. For any response name which appears in both provided field // maps, each field from the first field map must be compared to every field // in the second field map to find potential conflicts. foreach ( $ fieldMapA as $ responseName => $ fieldsA ) { $ fieldsB = $ fieldMapB [ $ responseName ] ?? null ; if ( null !== $ fieldsB ) { $ fieldsACount = \ count ( $ fieldsA ) ; $ fieldsBCount = \ count ( $ fieldsB ) ; /** @noinspection ForeachInvariantsInspection */ for ( $ i = 0 ; $ i < $ fieldsACount ; $ i ++ ) { /** @noinspection ForeachInvariantsInspection */ for ( $ j = 0 ; $ j < $ fieldsBCount ; $ j ++ ) { $ conflict = $ this -> findConflict ( $ responseName , $ fieldsA [ $ i ] , $ fieldsB [ $ j ] , $ parentFieldsAreMutuallyExclusive ) ; if ( null !== $ conflict ) { $ context -> reportConflict ( $ conflict ) ; } } } } } }
Collect all Conflicts between two collections of fields. This is similar to,
but different from the `collectConflictsWithin` function above. This check
assumes that `collectConflictsWithin` has already been called on each
provided collection of fields. This is true because this validator traverses
each individual selection set.

@param ComparisonContext $context
@param array             $fieldMapA
@param array             $fieldMapB
@param bool              $parentFieldsAreMutuallyExclusive
@throws ConversionException
@throws InvalidTypeException
@throws InvariantException
Collect all Conflicts between two collections of fields . This is similar to but different from the collectConflictsWithin function above . This check assumes that collectConflictsWithin has already been called on each provided collection of fields . This is true because this validator traverses each individual selection set .