private function checkOverlappingNames(array $maps): void
    {
        $index = 0;
        foreach ($maps as $type => $map) {
            $rest_maps = array_slice($maps, $index + 1, null, true);
            foreach ($rest_maps as $type2 => $map2) {
                $same = array_intersect_key($map, $map2);
                if ($same) {
                    throw new \InvalidArgumentException(
                        "Duplicating $type tokens and $type2 tokens: " . join(', ', array_keys($same))
                    );
                }
            }
            ++$index;
        }
    }
private function checkOverlappingNames(array $maps): void
    {
        $index = 0;
        foreach ($maps as $type => $map) {
            $rest_maps = array_slice($maps, $index + 1, null, true);
            foreach ($rest_maps as $type2 => $map2) {
                $same = array_intersect_key($map, $map2);
                if ($same) {
                    throw new \InvalidArgumentException(
                        "Duplicating $type tokens and $type2 tokens: " . join(', ', array_keys($same))
                    );
                }
            }
            ++$index;
        }
    }
private function checkOverlappingNames ( array $ maps ) : void { $ index = 0 ; foreach ( $ maps as $ type => $ map ) { $ rest_maps = array_slice ( $ maps , $ index + 1 , null , true ) ; foreach ( $ rest_maps as $ type2 => $ map2 ) { $ same = array_intersect_key ( $ map , $ map2 ) ; if ( $ same ) { throw new \ InvalidArgumentException ( "Duplicating $type tokens and $type2 tokens: " . join ( ', ' , array_keys ( $ same ) ) ) ; } } ++ $ index ; } }
Check defined tokens for duplicating names

Each token's name must be used only once. Inline tokens must not overlap
with names of named tokens.
@param array $maps Map on different tokens' maps. Key is token type for error message.
Value is tokens map of the type in form `[name => mixed, ...]`. Inline tokens use
its strings as name.
@throws \InvalidArgumentException Some overlapping names
Check defined tokens for duplicating names