Passed
Push — master ( 30757a...03f32c )
by Gabriel
11:44
created

HasKeysTrait::setPrivateKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Paytic\Omnipay\Paylike\Traits;
4
5
use Omnipay\Common\Message\AbstractRequest as CommonAbstractRequest;
6
7
/**
8
 * Trait HasKeysTrait
9
 * @package Paytic\Omnipay\Paylike\Traits
10
 */
11
trait HasKeysTrait
12
{
13
    /**
14
     * @return mixed
15
     */
16
    public function getPrivateKey()
17
    {
18
        return $this->getParameter('privateKey');
0 ignored issues
show
Bug introduced by
It seems like getParameter() 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
        return $this->/** @scrutinizer ignore-call */ getParameter('privateKey');
Loading history...
19
    }
20
21
    /**
22
     * @param $value
23
     * @return CommonAbstractRequest
24
     */
25
    public function setPrivateKey($value)
26
    {
27
        return $this->setParameter('privateKey', $value);
0 ignored issues
show
Bug introduced by
It seems like setParameter() 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

27
        return $this->/** @scrutinizer ignore-call */ setParameter('privateKey', $value);
Loading history...
28
    }
29
30
    /**
31
     * @return mixed
32
     */
33
    public function getPublicKey()
34
    {
35
        return $this->getParameter('publicKey');
36
    }
37
38
    /**
39
     * @param $value
40
     * @return CommonAbstractRequest
41
     */
42
    public function setPublicKey($value)
43
    {
44
        return $this->setParameter('publicKey', $value);
45
    }
46
}
47