public function writePoFile(string $file): void
    {
        $source = $this->dumpString();
        $testName = file_exists($file) ? $file : dirname($file);
        $status = is_writable($testName);
        if ($status === true) {
            $status = file_put_contents($file, $source);
        }
        if (false === $status) {
            throw new FileNotWritableException($file);
        }
    }
public function writePoFile(string $file): void
    {
        $source = $this->dumpString();
        $testName = file_exists($file) ? $file : dirname($file);
        $status = is_writable($testName);
        if ($status === true) {
            $status = file_put_contents($file, $source);
        }
        if (false === $status) {
            throw new FileNotWritableException($file);
        }
    }
public function writePoFile ( string $ file ) : void { $ source = $ this -> dumpString ( ) ; $ testName = file_exists ( $ file ) ? $ file : dirname ( $ file ) ; $ status = is_writable ( $ testName ) ; if ( $ status === true ) { $ status = file_put_contents ( $ file , $ source ) ; } if ( false === $ status ) { throw new FileNotWritableException ( $ file ) ; } }
Write any current contents to a po file

@param string $file po file to write

@return void

@throws FileNotWritableException
Write any current contents to a po file