Code Duplication    Length = 3-3 lines in 2 locations

src/phpsms/lib/CCPRestSmsSDK.php 2 locations

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