Passed
Push — master ( ff7474...c002dd )
by Gabriel
05:50
created

ServerCompletePurchaseRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 9
c 1
b 0
f 1
dl 0
loc 18
ccs 0
cts 7
cp 0
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseNotification() 0 10 3
1
<?php
2
3
namespace ByTIC\Payments\Gateways\Providers\PlatiOnline\Message;
4
5
use ByTIC\Omnipay\PlatiOnline\Message\ServerCompletePurchaseRequest as AbstractServerCompletePurchaseRequest;
6
use ByTIC\Payments\Gateways\Providers\AbstractGateway\Message\Traits\HasModelRequest;
7
8
/**
9
 * Class ServerCompletePurchaseRequest
10
 * @package ByTIC\Payments\Gateways\Providers\PlatiOnline\Message
11
 */
12
class ServerCompletePurchaseRequest extends AbstractServerCompletePurchaseRequest
13
{
14
    use HasModelRequest;
0 ignored issues
show
introduced by
The trait ByTIC\Payments\Gateways\...\Traits\HasModelRequest requires some properties which are not provided by ByTIC\Payments\Gateways\...CompletePurchaseRequest: $query, $id
Loading history...
15
    use Traits\CompletePurchaseTrait;
16
17
    /**
18
     * @inheritDoc
19
     */
20
    protected function parseNotification()
21
    {
22
        $return = parent::parseNotification();
23
        if ($return->f_order_number) {
24
            $model = $this->findModel($return->f_order_number);
25
            if (is_object($model)) {
26
                $this->setModel($model);
27
            }
28
        }
29
        return $return;
30
    }
31
}
32