OverwriteCompletePurchaseTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
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 10
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A completePurchase() 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 OverwriteCompletePurchaseTrait
9
 * @package ByTIC\Payments\Gateways\Providers\AbstractGateway\Traits
10
 */
11
trait OverwriteCompletePurchaseTrait
12
{
13
    // ------------ REQUESTS ------------ //
14
    /**
15
     * @param array $parameters
16
     * @return RequestInterface|null
17
     */
18 9
    public function completePurchase(array $parameters = []): RequestInterface
19
    {
20 9
        return $this->createRequestWithInternalCheck('completePurchase', $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

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