AbstractRequest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 48
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPurse() 0 4 1
A setPurse() 0 4 1
A getSecret() 0 4 1
A setSecret() 0 4 1
1
<?php
2
/**
3
 * ePayService driver for the Omnipay PHP payment processing library.
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-epayservice
6
 * @package   omnipay-epayservice
7
 * @license   MIT
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\ePayService\Message;
12
13
/**
14
 * ePayService Abstract Request.
15
 */
16
abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
17
{
18
    protected $zeroAmountAllowed = false;
19
20
    /**
21
     * Get the purse.
22
     *
23
     * @return string purse
24
     */
25 6
    public function getPurse()
26
    {
27 6
        return $this->getParameter('purse');
28
    }
29
30
    /**
31
     * Set the purse.
32
     *
33
     * @param string $purse purse
0 ignored issues
show
Bug introduced by
There is no parameter named $purse. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
34
     *
35
     * @return self
36
     */
37 13
    public function setPurse($value)
38
    {
39 13
        return $this->setParameter('purse', $value);
40
    }
41
42
    /**
43
     * Get the secret key.
44
     *
45
     * @return string secret key
46
     */
47 6
    public function getSecret()
48
    {
49 6
        return $this->getParameter('secret');
50
    }
51
52
    /**
53
     * Set the secret key.
54
     *
55
     * @param string $key secret key
0 ignored issues
show
Bug introduced by
There is no parameter named $key. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
56
     *
57
     * @return self
58
     */
59 13
    public function setSecret($value)
60
    {
61 13
        return $this->setParameter('secret', $value);
62
    }
63
}
64