Code Duplication    Length = 8-9 lines in 4 locations

src/Device/Device.php 4 locations

@@ 156-164 (lines=9) @@
153
        return $this->parseJSON('json', [self::API_DEV_UNBIND, $params]);
154
    }
155
156
    public function compelBind($openId, $deviceId)
157
    {
158
        $params = [
159
            'device_id' => $deviceId,
160
            'openid' => $openId,
161
        ];
162
163
        return $this->parseJSON('json', [self::API_DEV_COMPEL_BIND, $params]);
164
    }
165
166
    public function compelUnbind($openId, $deviceId)
167
    {
@@ 166-174 (lines=9) @@
163
        return $this->parseJSON('json', [self::API_DEV_COMPEL_BIND, $params]);
164
    }
165
166
    public function compelUnbind($openId, $deviceId)
167
    {
168
        $params = [
169
            'device_id' => $deviceId,
170
            'openid' => $openId,
171
        ];
172
173
        return $this->parseJSON('json', [self::API_DEV_COMPEL_UNBIND, $params]);
174
    }
175
176
    public function getDeviceStatus($deviceId)
177
    {
@@ 176-183 (lines=8) @@
173
        return $this->parseJSON('json', [self::API_DEV_COMPEL_UNBIND, $params]);
174
    }
175
176
    public function getDeviceStatus($deviceId)
177
    {
178
        $params = [
179
            'device_id' => $deviceId,
180
        ];
181
182
        return $this->parseJSON('get', [self::API_DEV_STAT, $params]);
183
    }
184
185
    public function verifyQrcode($ticket)
186
    {
@@ 194-202 (lines=9) @@
191
        return $this->parseJSON('post', [self::API_DEV_VERIFY_QRCODE, $params]);
192
    }
193
194
    public function getOpenid($deviceId)
195
    {
196
        $params = [
197
            'device_type' => $this->deviceType,
198
            'device_id' => $deviceId,
199
        ];
200
201
        return $this->parseJSON('get', [self::API_DEV_GET_OPENID, $params]);
202
    }
203
204
    public function getDeviceidByOpenid($openid)
205
    {