public function createTmpFile(string $suffix = ''): \SplFileInfo
    {
        $file = uniqid();
        if ($suffix) {
            $file .= '-' . $suffix;
        }
        return $this->createFile($file);
    }
public function createTmpFile(string $suffix = ''): \SplFileInfo
    {
        $file = uniqid();
        if ($suffix) {
            $file .= '-' . $suffix;
        }
        return $this->createFile($file);
    }
public function createTmpFile ( string $ suffix = '' ) : \ SplFileInfo { $ file = uniqid ( ) ; if ( $ suffix ) { $ file .= '-' . $ suffix ; } return $ this -> createFile ( $ file ) ; }
Create a randomly named temporary file.

@param string $suffix filename suffix
@throws \Exception
@return \SplFileInfo
Create a randomly named temporary file .