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

updateParametersFromGateway()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 5
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 7
ccs 0
cts 6
cp 0
crap 2
rs 10
1
<?php
2
3
namespace ByTIC\Payments\Gateways\Providers\Romcard\Message\Traits;
4
5
use ByTIC\Payments\Gateways\Providers\Romcard\Gateway;
6
7
/**
8
 * Trait CompletePurchaseTrait
9
 */
10
trait CompletePurchaseTrait
11
{
12
    /**
13
     * @param Gateway $gateway
14
     */
15
    protected function updateParametersFromGateway($gateway)
16
    {
17
        $this->setTerminal($gateway->getTerminal());
0 ignored issues
show
Bug introduced by
It seems like setTerminal() 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

17
        $this->/** @scrutinizer ignore-call */ 
18
               setTerminal($gateway->getTerminal());
Loading history...
18
        $this->setKey($gateway->getKey());
0 ignored issues
show
Bug introduced by
It seems like setKey() 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

18
        $this->/** @scrutinizer ignore-call */ 
19
               setKey($gateway->getKey());
Loading history...
19
        $this->setMerchantName($gateway->getMerchantName());
0 ignored issues
show
Bug introduced by
It seems like setMerchantName() 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

19
        $this->/** @scrutinizer ignore-call */ 
20
               setMerchantName($gateway->getMerchantName());
Loading history...
20
        $this->setMerchantEmail($gateway->getMerchantEmail());
0 ignored issues
show
Bug introduced by
It seems like setMerchantEmail() 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
        $this->/** @scrutinizer ignore-call */ 
21
               setMerchantEmail($gateway->getMerchantEmail());
Loading history...
21
        $this->setMerchantUrl($gateway->getMerchantUrl());
0 ignored issues
show
Bug introduced by
It seems like setMerchantUrl() 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
        $this->/** @scrutinizer ignore-call */ 
22
               setMerchantUrl($gateway->getMerchantUrl());
Loading history...
22
    }
23
}
24