Test Failed
Branch master (3f2e80)
by Gabriel
03:43 queued 01:39
created

HasKeysTrait::getPublicKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ByTIC\Omnipay\Paylike\Traits;
4
5
use Omnipay\Common\Message\AbstractRequest as CommonAbstractRequest;
6
7
/**
8
 * Trait HasKeysTrait
9
 * @package ByTIC\Omnipay\Paylike\Traits
10
 */
11
trait HasKeysTrait
12
{
13
14
    /**
15
     * @return mixed
16
     */
17
    public function getPrivateKey()
18
    {
19
        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

19
        return $this->/** @scrutinizer ignore-call */ getParameter('privateKey');
Loading history...
20
    }
21
22
    /**
23
     * @param $value
24
     * @return CommonAbstractRequest
25
     */
26
    public function setPrivateKey($value)
27
    {
28
        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

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