public function getExpectedGitattributesContent(array $postfixlessExportIgnores = [])
    {
        if ($postfixlessExportIgnores === []) {
            $postfixlessExportIgnores = $this->collectExpectedExportIgnores();
        }

        if (!$this->hasGitattributesFile() && count($postfixlessExportIgnores) > 0) {
            $postfixlessExportIgnores[] = '.gitattributes';
        }

        sort($postfixlessExportIgnores, SORT_STRING | SORT_FLAG_CASE);

        if (count($postfixlessExportIgnores) > 0) {
            if ($this->isAlignExportIgnoresEnabled() || $this->isStrictAlignmentCamparisonEnabled()) {
                $postfixlessExportIgnores = $this->getAlignedExportIgnoreArtifacts(
                    $postfixlessExportIgnores
                );
            }

            $content = implode(" export-ignore" . $this->preferredEol, $postfixlessExportIgnores)
                . " export-ignore" . $this->preferredEol;

            if ($this->hasGitattributesFile()) {
                $exportIgnoreContent = rtrim($content);
                $content = $this->getPresentNonExportIgnoresContent();

                if (strstr($content, self::EXPORT_IGNORES_PLACEMENT_PLACEHOLDER)) {
                    $content = str_replace(
                        self::EXPORT_IGNORES_PLACEMENT_PLACEHOLDER,
                        $exportIgnoreContent,
                        $content
                    );
                } else {
                    $content = $content
                        . str_repeat($this->preferredEol, 2)
                        . $exportIgnoreContent;
                }
            } else {
                $content = "* text=auto eol=lf"
                    . str_repeat($this->preferredEol, 2)
                    . $content;
            }

            return $content;
        }

        return '';
    }