Code Duplication    Length = 12-12 lines in 2 locations

class/Admin.php 1 location

@@ 449-460 (lines=12) @@
446
     * @return string|string[]
447
     * @return string|string[]
448
     */
449
    public function smallworld_sanitize($text)
450
    {
451
        $text = htmlspecialchars($text, ENT_QUOTES);
452
        $myts = \MyTextSanitizer::getInstance();
453
        $text = $myts->displayTarea($text, 1, 1, 1, 1);
454
        $text = str_replace("\n\r", "\n", $text);
455
        $text = str_replace("\r\n", "\n", $text);
456
        $text = str_replace("\n", '<br>', $text);
457
        $text = str_replace('"', "'", $text);
458
459
        return $text;
460
    }
461
}
462

class/SmallworldAdmin.php 1 location

@@ 443-454 (lines=12) @@
440
     * @param string $text
441
     * @returns string
442
     */
443
    public function Smallworld_sanitize($text)
444
    {
445
        $text = htmlspecialchars($text, ENT_QUOTES);
446
        $myts = \MyTextSanitizer::getInstance();
447
        $text = $myts->displayTarea($text, 1, 1, 1, 1);
448
        $text = str_replace("\n\r", "\n", $text);
449
        $text = str_replace("\r\n", "\n", $text);
450
        $text = str_replace("\n", '<br>', $text);
451
        $text = str_replace('"', "'", $text);
452
453
        return $text;
454
    }
455
}
456
457
/*