src/Export/Writer/GraphvizWriter.php
protected function writeFile(string $contents, string $file): GraphvizWriter
    {
        if (!file_put_contents($file, $contents)) {
            throw ExportException::create(
                'Couldn\'t write to file "'.$file.'".'
            );
        }

        return $this;
    }
protected function writeFile(string $contents, string $file): GraphvizWriter
    {
        if (!file_put_contents($file, $contents)) {
            throw ExportException::create(
                'Couldn\'t write to file "'.$file.'".'
            );
        }

        return $this;
    }
protected function writeFile ( string $ contents , string $ file ) : GraphvizWriter { if ( ! file_put_contents ( $ file , $ contents ) ) { throw ExportException :: create ( 'Couldn\'t write to file "' . $ file . '".' ) ; } return $ this ; }
Writes contents to a file.

@param string $contents - File contents.
@param string $file     - File.

@throws ExportException

@return GraphvizWriter
Writes contents to a file .