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

CompletePurchaseRequest::getModelIdFromRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 4
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace ByTIC\Payments\Gateways\Providers\Librapay\Message;
4
5
use ByTIC\Omnipay\Librapay\Message\CompletePurchaseRequest as AbstractCompletePurchaseRequest;
6
use ByTIC\Payments\Gateways\Providers\AbstractGateway\Message\CompletePurchaseRequestInterface;
0 ignored issues
show
Bug introduced by
The type ByTIC\Payments\Gateways\...urchaseRequestInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use ByTIC\Payments\Gateways\Providers\AbstractGateway\Message\Traits\HasModelRequest;
8
use ByTIC\Payments\Gateways\Providers\Librapay\Helper;
9
use ByTIC\Payments\Gateways\Providers\Librapay\Message\Traits\CompletePurchaseTrait;
10
11
/**
12
 * Class PurchaseResponse
13
 * @package ByTIC\Payments\Gateways\Providers\Librapay\Message
14
 */
15
class CompletePurchaseRequest extends AbstractCompletePurchaseRequest
16
{
17
    use CompletePurchaseTrait;
0 ignored issues
show
introduced by
The trait ByTIC\Payments\Gateways\...s\CompletePurchaseTrait requires some properties which are not provided by ByTIC\Payments\Gateways\...CompletePurchaseRequest: $query, $id
Loading history...
18
19
    /**
20
     * @inheritdoc
21
     */
22
    protected function parseNotification()
23
    {
24
        if ($this->validateModel()) {
25
            $model = $this->getModel();
26
            $this->updateParametersFromPurchase($model);
27
        }
28
29
        return parent::parseNotification();
30
    }
31
}
32