Code Duplication    Length = 5-5 lines in 2 locations

src/onepay/PaymentGateway.php 1 location

@@ 167-171 (lines=5) @@
164
        $data = $requestData->get();
165
        $data[0] = $commandUrls[$command];
166
167
        if ($command === self::RC_PURCHASE) {
168
            return ['redirect_url' => $httpClient->createRequest()->setUrl($data)->getFullUrl()];
169
        } else {
170
            return $httpClient->get($data)->send()->getData();
171
        }
172
    }
173
174
    /**

src/vnpayment/PaymentGateway.php 1 location

@@ 119-123 (lines=5) @@
116
        $data = $requestData->get();
117
        $data[0] = $commandUrls[$command];
118
119
        if ($command === self::RC_PURCHASE) {
120
            return ['redirect_url' => $httpClient->createRequest()->setUrl($data)->getFullUrl()];
121
        } else {
122
            return $httpClient->get($data)->send()->getData();
123
        }
124
    }
125
126
    /**