Code Duplication    Length = 5-5 lines in 2 locations

src/onepay/PaymentGateway.php 1 location

@@ 175-179 (lines=5) @@
172
        $data = $requestData->get();
173
        $data[0] = $commandUrls[$command];
174
175
        if ($command === self::RC_PURCHASE) {
176
            return ['redirect_url' => $httpClient->createRequest()->setUrl($data)->getFullUrl()];
177
        } else {
178
            return $httpClient->get($data)->send()->getData();
179
        }
180
    }
181
182
    /**

src/vnpayment/PaymentGateway.php 1 location

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