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

CompletePurchaseTrait::updateParametersFromModel()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 7
c 2
b 0
f 1
dl 0
loc 10
ccs 0
cts 8
cp 0
rs 10
cc 2
nc 2
nop 1
crap 6
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