Code Duplication    Length = 4-4 lines in 2 locations

src/Controller/Component/CsvExportComponent.php 1 location

@@ 119-122 (lines=4) @@
116
    private function _parseCsv($v, $delimiter)
117
    {
118
        //区切り文字・改行・ダブルクオートの時
119
        if (preg_match('/[' . $delimiter . '\\n"]/', $v)) {
120
            $v = str_replace('"', '""', $v);
121
            $v = '"' . $v . '"';
122
        }
123
        return $v;
124
    }
125

src/LargeExport/LargeCsvExport.php 1 location

@@ 91-94 (lines=4) @@
88
        mb_convert_variables($this->settings['export_encoding'], $this->settings['array_encoding'], $lists);
89
        foreach ($lists as $listKey => $list) {
90
            //区切り文字・改行・ダブルクオートの時
91
            if (preg_match('/[' . $this->settings['delimiter'] . '\\n"]/', $list)) {
92
                $list = str_replace('"', '""', $list);
93
                $lists[$listKey] = '"' . $list . '"';
94
            }
95
        }
96
        // カンマ区切り
97
        return implode($this->settings['delimiter'], $lists) . "\r\n";