private function updateRootDirOnTargetFile(): void
    {
        $realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
        if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
            $updatedPath = str_replace(
                '/src/',
                '/tests/',
                $this->targetFile->getPath()
            );
            $this->targetFile->setPath($updatedPath);
        }
    }