Code Duplication    Length = 11-11 lines in 2 locations

Alpha/Util/Extension/TCPDFFacade.php 1 location

@@ 322-332 (lines=11) @@
319
     *
320
     * @since 1.0
321
     */
322
    private function loadHTMLCache()
323
    {
324
        $fp = fopen($this->HTMLFilename, 'r');
325
326
        if (!$fp) {
327
            throw new AlphaException('Failed to open the cache file for reading, directory permissions my not be set correctly!', 'loadHTMLCache()');
328
        } else {
329
            $this->content = fread($fp, filesize($this->HTMLFilename));
330
            fclose($fp); //closes the file
331
        }
332
    }
333
334
    /**
335
     * Used to check the PDF cache for the BO cache file.

Alpha/Util/Extension/MarkdownFacade.php 1 location

@@ 247-257 (lines=11) @@
244
     *
245
     * @since 1.0
246
     */
247
    public function loadCache()
248
    {
249
        $fp = fopen($this->filename, 'r');
250
251
        if (!$fp) {
252
            throw new AlphaException('Failed to open the cache file for reading, directory permissions my not be set correctly!');
253
        } else {
254
            $this->content = fread($fp, filesize($this->filename));
255
            fclose($fp); //closes the file
256
        }
257
    }
258
}
259