Issues (9)

src/Traits/HasKeysTrait.php (2 issues)

Labels
Severity
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
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
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