AbstractRequest::setPurse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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