Code Duplication    Length = 7-7 lines in 2 locations

src/BasePaymentGateway.php 1 location

@@ 245-251 (lines=7) @@
242
        if (in_array($command, $this->verifyRequestCommands(), true)) {
243
            $client = $this->getClient($clientId);
244
245
            if ($request === null) {
246
                if (Yii::$app instanceof \yii\web\Application) {
247
                    $request = Yii::$app->getRequest();
248
                } else {
249
                    throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!');
250
                }
251
            }
252
253
            $data = $this->getVerifyRequestData($command, $request);
254
            /** @var VerifiedData $requestData */

src/baokim/PaymentGateway.php 1 location

@@ 297-303 (lines=7) @@
294
    {
295
        if ($command === self::VRC_IPN) {
296
297
            if ($request === null) {
298
                if (Yii::$app instanceof \yii\web\Application) {
299
                    $request = Yii::$app->getRequest();
300
                } else {
301
                    throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!');
302
                }
303
            }
304
305
            $content = $this->getHttpClient()->post(self::VERIFY_IPN_URL, $request->post())->send()->getContent();
306