Code Duplication    Length = 19-23 lines in 2 locations

Alpha/Util/Extension/TCPDFFacade.php 1 location

@@ 242-264 (lines=23) @@
239
      *
240
      * @since 1.0
241
      */
242
     private function markdown($text, $attachURL = '')
243
     {
244
         $config = ConfigProvider::getInstance();
245
246
        /*
247
         * Initialize the parser and return the result of its transform method.
248
         *
249
         */
250
        static $parser;
251
252
         if (!isset($parser)) {
253
             $parser = new \Alpha\Util\Extension\Markdown();
254
         }
255
256
        /*
257
         * Replace all instances of $sysURL in the text with the app.url setting from config
258
         *
259
         */
260
        $text = str_replace('$sysURL', $config->get('app.url'), $text);
261
262
        // transform text using parser.
263
        return $parser->transform($text);
264
     }
265
266
    /**
267
     * Fetter for the content.

Alpha/Util/Extension/MarkdownFacade.php 1 location

@@ 173-191 (lines=19) @@
170
     *
171
     * @since 1.0
172
     */
173
    public function markdown($text)
174
    {
175
        $config = ConfigProvider::getInstance();
176
177
        // Initialize the parser and return the result of its transform method.
178
        static $parser;
179
180
        if (!isset($parser)) {
181
            $parser = new \Alpha\Util\Extension\Markdown();
182
        }
183
184
        /*
185
         * Replace all instances of $sysURL in the text with the app.url setting from config
186
         */
187
        $text = str_replace('$sysURL', $config->get('app.url'), $text);
188
189
        // transform text using parser.
190
        return $parser->transform($text);
191
    }
192
193
    /**
194
     * Getter for the content.