Code Duplication    Length = 10-10 lines in 2 locations

src/BasePaymentGateway.php 2 locations

@@ 183-192 (lines=10) @@
180
    /**
181
     * @inheritdoc
182
     */
183
    public function beforeRequest(RequestEvent $event)
184
    {
185
        if ($event->command === self::RC_PURCHASE) {
186
            $this->trigger(self::EVENT_BEFORE_PURCHASE, $event);
187
        } elseif ($event->command === self::RC_QUERY_DR) {
188
            $this->trigger(self::EVENT_BEFORE_QUERY_DR, $event);
189
        }
190
191
        parent::beforeRequest($event);
192
    }
193
194
    /**
195
     * @inheritdoc
@@ 197-206 (lines=10) @@
194
    /**
195
     * @inheritdoc
196
     */
197
    public function afterRequest(RequestEvent $event)
198
    {
199
        if ($event->command === self::RC_PURCHASE) {
200
            $this->trigger(self::EVENT_AFTER_PURCHASE, $event);
201
        } elseif ($event->command === self::RC_QUERY_DR) {
202
            $this->trigger(self::EVENT_AFTER_QUERY_DR, $event);
203
        }
204
205
        parent::afterRequest($event);
206
    }
207
208
    /**
209
     * Phương thức này là phương thức ánh xạ của [[verifyRequest()]] nó sẽ tạo lệnh [[VRC_PURCHASE_SUCCESS]]