private function prepareAutoloadPaths(
        string $mergeSection,
        array $packageComposerJson,
        SmartFileInfo $packageFile
    ): array {
        if (! in_array($mergeSection, ['autoload', 'autoload-dev'], true)) {
            return $packageComposerJson;
        }

        foreach ($this->sectionsWithPath as $sectionWithPath) {
            if (! isset($packageComposerJson[$mergeSection][$sectionWithPath])) {
                continue;
            }

            $packageComposerJson[$mergeSection][$sectionWithPath] = $this->relativizePath(
                $packageComposerJson[$mergeSection][$sectionWithPath],
                $packageFile
            );
        }

        return $packageComposerJson;
    }