Code Duplication    Length = 7-7 lines in 2 locations

system/modules/Money/appControllers/MerchantsController.php 2 locations

@@ 30-36 (lines=7) @@
27
28
    public function reciverAction($system = '', $status = '') {
29
        $postData = [];
30
        foreach ($_POST as $key => $text) {
31
            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), true)) {
32
                $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
33
            } else {
34
                $postData[$key] = $text;
35
            }
36
        }
37
        foreach ($_GET as $key => $text) {
38
            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), true)) {
39
                $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
@@ 37-43 (lines=7) @@
34
                $postData[$key] = $text;
35
            }
36
        }
37
        foreach ($_GET as $key => $text) {
38
            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), true)) {
39
                $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
40
            } else {
41
                $postData[$key] = $text;
42
            }
43
        }
44
        $merchant = false;
45
46
        if ($system) {