Code Duplication    Length = 24-24 lines in 2 locations

src/Helpers/String.php 2 locations

@@ 631-654 (lines=24) @@
628
     *
629
     * @return array final output
630
     */
631
    public static function squoteArray($uArray, $uCover = false)
632
    {
633
        $tArray = [];
634
        foreach ((array)$uArray as $tKey => $tValue) {
635
            if ($uCover) {
636
                $tArray[$tKey] = "'" .
637
                    str_replace(
638
                        self::$defaults["squote_replacement"][0],
639
                        self::$defaults["squote_replacement"][1],
640
                        $tValue
641
                    ) .
642
                    "'";
643
                continue;
644
            }
645
646
            $tArray[$tKey] = str_replace(
647
                self::$defaults["squote_replacement"][0],
648
                self::$defaults["squote_replacement"][1],
649
                $tValue
650
            );
651
        }
652
653
        return $tArray;
654
    }
655
656
    /**
657
     * Escapes double quotes in a set of strings
@@ 664-687 (lines=24) @@
661
     *
662
     * @return array final output
663
     */
664
    public static function dquoteArray($uArray, $uCover = false)
665
    {
666
        $tArray = [];
667
        foreach ((array)$uArray as $tKey => $tValue) {
668
            if ($uCover) {
669
                $tArray[$tKey] = "\"" .
670
                    str_replace(
671
                        self::$defaults["dquote_replacement"][0],
672
                        self::$defaults["dquote_replacement"][1],
673
                        $tValue
674
                    ) .
675
                    "\"";
676
                continue;
677
            }
678
679
            $tArray[$tKey] = str_replace(
680
                self::$defaults["dquote_replacement"][0],
681
                self::$defaults["dquote_replacement"][1],
682
                $tValue
683
            );
684
        }
685
686
        return $tArray;
687
    }
688
689
    /**
690
     * Replaces CRLF characters with given string