OverwriteServerCompletePurchaseTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 1
Metric Value
wmc 1
eloc 2
c 1
b 1
f 1
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A serverCompletePurchase() 0 3 1
1
<?php
2
3
namespace ByTIC\Payments\Gateways\Providers\AbstractGateway\Traits;
4
5
use Omnipay\Common\Message\RequestInterface;
6
7
/**
8
 * Trait OverwriteServerCompletePurchaseTrait
9
 * @package ByTIC\Payments\Gateways\Providers\AbstractGateway\Traits
10
 */
11
trait OverwriteServerCompletePurchaseTrait
12
{
13
    // ------------ REQUESTS ------------ //
14
15
    /**
16
     * @param array $parameters
17
     * @return RequestInterface|null
18
     */
19 7
    public function serverCompletePurchase(array $parameters = []): RequestInterface
20
    {
21 7
        return $this->createRequestWithInternalCheck('ServerCompletePurchaseRequest', $parameters);
0 ignored issues
show
Bug introduced by
It seems like createRequestWithInternalCheck() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        return $this->/** @scrutinizer ignore-call */ createRequestWithInternalCheck('ServerCompletePurchaseRequest', $parameters);
Loading history...
22
    }
23
}
24