Code Duplication    Length = 7-7 lines in 2 locations

src/core/DeCaptchaBase.php 2 locations

@@ 179-185 (lines=7) @@
176
            $data = $this->decodeResponse(static::DECODE_ACTION_RECOGNIZE, $response);
177
            if ($data[static::DECODE_PARAM_RESPONSE] === 'OK' && !empty($data[static::DECODE_PARAM_CAPTCHA])) {
178
                $this->setParamSpec(static::PARAM_SPEC_CAPTCHA, $data[static::DECODE_PARAM_CAPTCHA]);
179
            } else {
180
                if ($data[static::DECODE_PARAM_RESPONSE] === 'ERROR_NO_SLOT_AVAILABLE' && $this->limit[static::ACTION_RECOGNIZE] > 0) {
181
                    $this->limit[static::ACTION_RECOGNIZE]--;
182
                    return $this->recognize($filePath);
183
                }
184
                throw new DeCaptchaErrors($data[static::DECODE_PARAM_RESPONSE]);
185
            }
186
            while ($this->limit[static::ACTION_UNIVERSAL_WITH_CAPTCHA] > 0) {
187
                $response = $this->getResponse(static::ACTION_UNIVERSAL_WITH_CAPTCHA);
188
                $data = $this->decodeResponse(static::DECODE_ACTION_GET, $response);
@@ 192-198 (lines=7) @@
189
                if ($data[static::DECODE_PARAM_RESPONSE] === 'OK' && !empty($data[static::DECODE_PARAM_CODE])) {
190
                    $this->code = $data[static::DECODE_PARAM_CODE];
191
                    return true;
192
                } else {
193
                    $this->limit[static::ACTION_UNIVERSAL_WITH_CAPTCHA]--;
194
                    if ($data[static::DECODE_PARAM_RESPONSE] === 'CAPCHA_NOT_READY' && $this->limit[static::ACTION_UNIVERSAL_WITH_CAPTCHA] > 0) {
195
                        continue;
196
                    }
197
                    throw new DeCaptchaErrors($data[static::DECODE_PARAM_RESPONSE]);
198
                }
199
            }
200
        } catch (Exception $e) {
201
            $this->error = $e->getMessage();