Code Duplication    Length = 3-3 lines in 2 locations

src/phpsms/lib/CCPRestSmsSDK.php 2 locations

@@ 118-120 (lines=3) @@
115
        // 拼接请求包体
116
        if ($this->BodyType === 'json') {
117
            $data = '';
118
            for ($i = 0; $i < count($datas); $i++) {
119
                $data = $data . "'" . $datas[$i] . "',";
120
            }
121
            $body = "{'to':'$to','templateId':'$tempId','appId':'$this->AppId','datas':[" . $data . ']}';
122
        } else {
123
            $data = '';
@@ 124-126 (lines=3) @@
121
            $body = "{'to':'$to','templateId':'$tempId','appId':'$this->AppId','datas':[" . $data . ']}';
122
        } else {
123
            $data = '';
124
            for ($i = 0; $i < count($datas); $i++) {
125
                $data = $data . '<data>' . $datas[$i] . '</data>';
126
            }
127
            $body = "<TemplateSMS>
128
                    <to>$to</to> 
129
                    <appId>$this->AppId</appId>