ServerCompletePurchaseRequest::getData()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 9
ccs 0
cts 4
cp 0
crap 6
rs 10
1
<?php
2
3
namespace ByTIC\Payments\Mobilpay\Message;
4
5
use ByTIC\Omnipay\Mobilpay\Message\ServerCompletePurchaseRequest as AbstractServerCompletePurchaseRequest;
6
7
/**
8
 * Class ServerCompletePurchaseRequest
9
 * @package ByTIC\Payments\Mobilpay\Message
10
 */
11
class ServerCompletePurchaseRequest extends AbstractServerCompletePurchaseRequest
12
{
13
    use Traits\CompletePurchaseRequestTrait;
0 ignored issues
show
introduced by
The trait ByTIC\Payments\Mobilpay\...etePurchaseRequestTrait requires some properties which are not provided by ByTIC\Payments\Mobilpay\...CompletePurchaseRequest: $query, $id
Loading history...
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function getData()
19
    {
20
        $return = parent::getData();
21
        // Add model only if has data
22
        if (count($return)) {
23
            $return['model'] = $this->getModel();
24
        }
25
26
        return $return;
27
    }
28
}
29