Code Duplication    Length = 5-5 lines in 2 locations

src/phpsms/lib/CCPRestSmsSDK.php 2 locations

@@ 210-214 (lines=5) @@
207
        $header = array("Accept:application/$this->BodyType", "Content-Type:application/$this->BodyType;charset=utf-8", "Authorization:$authen");
208
        // 发送请求
209
        $result = $this->curl_post($url, $body, $header);
210
        if ($this->BodyType === 'json') {//JSON格式
211
            $datas = json_decode($result);
212
        } else { //xml格式
213
            $datas = simplexml_load_string(trim($result, " \t\n\r"));
214
        }
215
216
        return $datas;
217
    }
@@ 147-151 (lines=5) @@
144
        $header = array("Accept:application/$this->BodyType", "Content-Type:application/$this->BodyType;charset=utf-8", "Authorization:$authen");
145
        // 发送请求
146
        $result = $this->curl_post($url, $body, $header);
147
        if ($this->BodyType === 'json') {//JSON格式
148
           $datas = json_decode($result);
149
        } else { //xml格式
150
           $datas = simplexml_load_string(trim($result, " \t\n\r"));
151
        }
152
        // 重新装填数据
153
        if (isset($datas->templateSMS)) {
154
            $datas->TemplateSMS = $datas->templateSMS;