Code Duplication    Length = 7-7 lines in 2 locations

src/BasePaymentGateway.php 1 location

@@ 331-337 (lines=7) @@
328
        if (in_array($command, $this->verifyRequestCommands(), true)) {
329
            $client = $this->getClient($clientId);
330
331
            if ($request === null) {
332
                if (Yii::$app instanceof \yii\web\Application) {
333
                    $request = Yii::$app->getRequest();
334
                } else {
335
                    throw new InvalidArgumentException('Request instance arg must be set to verify return request is valid or not!');
336
                }
337
            }
338
339
            $data = $this->getVerifyRequestData($command, $request);
340
            /** @var VerifiedData $requestData */

src/baokim/PaymentGateway.php 1 location

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