Code Duplication    Length = 12-13 lines in 2 locations

class/doc-restructuredtext.php 1 location

@@ 591-603 (lines=13) @@
588
589
			proc_close($proc);
590
		}
591
		else {
592
			// Use tmp file
593
			$f_tmp = tempnam(sys_get_temp_dir(), 'fwolflib.doc-restructuredtext.');
594
			file_put_contents($f_tmp, $s_rst);
595
596
			// Execute cmd, got result.
597
			$s_cmd .= " $f_tmp";
598
			$this->Log("ToHtml by cmd: $s_cmd", 1);
599
			exec($s_cmd, $ar_out);
600
601
			unlink($f_tmp);
602
			$s_out = implode("\n", $ar_out);
603
		}
604
605
		$this->sHtml = $s_out;
606
		return $s_out;

src/Fwlib/Html/TextDocument/Restructuredtext.php 1 location

@@ 107-118 (lines=12) @@
104
105
            proc_close($proc);
106
107
        } else {
108
            // Use tmp file
109
            $tmpFile = tempnam(sys_get_temp_dir(), 'fwlib-html-restructuredtext-');
110
            file_put_contents($tmpFile, $str);
111
112
            // Execute cmd, got result
113
            $cmd .= " $tmpFile";
114
            exec($cmd, $output);
115
116
            unlink($tmpFile);
117
            $html = implode("\n", $output);
118
        }
119
120
121
        if ($bodyOnly) {