Completed
Push — master ( 3e6656...a43425 )
by Andrii
10s
created

AbstractRequest::setPurse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * RoboKassa driver for the Omnipay PHP payment processing library
5
 *
6
 * @link      https://github.com/hiqdev/omnipay-robokassa
7
 * @package   omnipay-robokassa
8
 * @license   MIT
9
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace Omnipay\RoboKassa\Message;
13
14
/**
15
 * RoboKassa Abstract Request.
16
 */
17
abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
18
{
19
    protected $zeroAmountAllowed = false;
20
21
    /**
22
     * Get the purse.
23
     *
24
     * @return string purse
25
     */
26
    public function getPurse()
27
    {
28
        return $this->getParameter('purse');
29
    }
30
31
    /**
32
     * Set the purse.
33
     *
34
     * @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...
35
     *
36
     * @return self
37
     */
38
    public function setPurse($value)
39
    {
40
        return $this->setParameter('purse', $value);
41
    }
42
43
    /**
44
     * Get the secret key.
45
     *
46
     * @return string secret key
47
     */
48
    public function getPassword()
49
    {
50
        return $this->getParameter('secretKey');
51
    }
52
53
    /**
54
     * Set the secret key.
55
     *
56
     * @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...
57
     *
58
     * @return self
59
     */
60
    public function setPassword($value)
61
    {
62
        return $this->setParameter('secretKey', $value);
63
    }
64
}
65