Code Duplication    Length = 8-8 lines in 4 locations

src/onepay/PaymentGateway.php 4 locations

@@ 141-148 (lines=8) @@
138
     * @return ResponseData|DataInterface
139
     * @inheritdoc
140
     */
141
    public function purchase(array $data, $clientId = null): DataInterface
142
    {
143
        if ($this->sandbox && $clientId === null) {
144
            $clientId = $this->international ? self::ID_CLIENT_SANDBOX_INTERNATIONAL : self::ID_CLIENT_SANDBOX_DOMESTIC;
145
        }
146
147
        return parent::purchase($data, $clientId);
148
    }
149
150
    /**
151
     * @return ResponseData|DataInterface
@@ 154-161 (lines=8) @@
151
     * @return ResponseData|DataInterface
152
     * @inheritdoc
153
     */
154
    public function queryDR(array $data, $clientId = null): DataInterface
155
    {
156
        if ($this->sandbox && $clientId === null) {
157
            $clientId = $this->international ? self::ID_CLIENT_SANDBOX_INTERNATIONAL : self::ID_CLIENT_SANDBOX_DOMESTIC;
158
        }
159
160
        return parent::queryDR($data, $clientId);
161
    }
162
163
    /**
164
     * @return bool|VerifiedData
@@ 167-174 (lines=8) @@
164
     * @return bool|VerifiedData
165
     * @inheritdoc
166
     */
167
    public function verifyRequestIPN($clientId = null, \yii\web\Request $request = null)
168
    {
169
        if ($this->sandbox && $clientId === null) {
170
            $clientId = $this->international ? self::ID_CLIENT_SANDBOX_INTERNATIONAL : self::ID_CLIENT_SANDBOX_DOMESTIC;
171
        }
172
173
        return parent::verifyRequestIPN($clientId, $request);
174
    }
175
176
    /**
177
     * @return bool|VerifiedData
@@ 180-187 (lines=8) @@
177
     * @return bool|VerifiedData
178
     * @inheritdoc
179
     */
180
    public function verifyRequestPurchaseSuccess($clientId = null, \yii\web\Request $request = null)
181
    {
182
        if ($this->sandbox && $clientId === null) {
183
            $clientId = $this->international ? self::ID_CLIENT_SANDBOX_INTERNATIONAL : self::ID_CLIENT_SANDBOX_DOMESTIC;
184
        }
185
186
        return parent::verifyRequestPurchaseSuccess($clientId, $request);
187
    }
188
189
190
    /**