Code Duplication    Length = 8-9 lines in 2 locations

application/modules/mod_discount/discount_api.php 1 location

@@ 115-123 (lines=9) @@
112
            }
113
            $discount['result_sum_discount_convert'] = ShopCore::app()->SCurrencyHelper->convert($discount['result_sum_discount']);
114
        }
115
        if ($discount['result_sum_discount']) {
116
            if ($this->input->server('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' && !$typeReturn) {
117
                echo json_encode($discount);
118
            } else {
119
                return $discount;
120
            }
121
        } else {
122
            echo '';
123
        }
124
    }
125
126
    /**

application/modules/menu/admin.php 1 location

@@ 1078-1085 (lines=8) @@
1075
                $data['links'] = 0;
1076
            }
1077
1078
            if ($this->input->server('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest') {
1079
                if ($referer == 'controller') {
1080
                    return $data;
1081
                }
1082
                echo json_encode($data);
1083
            } else {
1084
                return $data;
1085
            }
1086
        }
1087
    }
1088