Code Duplication    Length = 3-3 lines in 2 locations

src/lib/Rest.php 2 locations

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