protected function overwriteGitattributesFile($content)
    {
        $bytesWritten = file_put_contents(
            $this->analyser->getGitattributesFilePath(),
            $content
        );

        if ($bytesWritten) {
            $content = 'Overwrote it with the shown content:'
                . PHP_EOL . '<info>' . $content . '</info>';

            return PHP_EOL . PHP_EOL . $content;
        }

        $message = 'Overwrite of .gitattributes file failed.';
        throw new GitattributesCreationFailed($message);
    }
protected function overwriteGitattributesFile($content)
    {
        $bytesWritten = file_put_contents(
            $this->analyser->getGitattributesFilePath(),
            $content
        );

        if ($bytesWritten) {
            $content = 'Overwrote it with the shown content:'
                . PHP_EOL . '<info>' . $content . '</info>';

            return PHP_EOL . PHP_EOL . $content;
        }

        $message = 'Overwrite of .gitattributes file failed.';
        throw new GitattributesCreationFailed($message);
    }
protected function overwriteGitattributesFile ( $ content ) { $ bytesWritten = file_put_contents ( $ this -> analyser -> getGitattributesFilePath ( ) , $ content ) ; if ( $ bytesWritten ) { $ content = 'Overwrote it with the shown content:' . PHP_EOL . '<info>' . $ content . '</info>' ; return PHP_EOL . PHP_EOL . $ content ; } $ message = 'Overwrite of .gitattributes file failed.' ; throw new GitattributesCreationFailed ( $ message ) ; }
Overwrite an existing gitattributes file.

@param  string  $content The content of the gitattributes file
@throws \Stolt\LeanPackage\Exceptions\GitattributesCreationFailed

@return string
Overwrite an existing gitattributes file .