AbstractRequest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 44
ccs 8
cts 8
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSecret() 0 3 1
A setPurse() 0 3 1
A setSecret() 0 3 1
A getPurse() 0 3 1
1
<?php
2
/**
3
 * Paxum driver for PHP merchant library
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-paxum
6
 * @package   omnipay-paxum
7
 * @license   MIT
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\Paxum\Message;
12
13
/**
14
 * Paxum Abstract Request.
15
 */
16
abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
17
{
18
    protected $zeroAmountAllowed = false;
19
20
    /**
21
     * Get the merchant purse.
22
     *
23
     * @return string merchant purse - email associated with the merchant account
24
     */
25 6
    public function getPurse()
26
    {
27 6
        return $this->getParameter('purse');
28
    }
29
30
    /**
31
     * Set the purse.
32
     *
33
     * @param string $value merchant purse - email associated with the merchant account
34
     * @return self
35
     */
36 14
    public function setPurse($value)
37
    {
38 14
        return $this->setParameter('purse', $value);
39
    }
40
41
    /**
42
     * Get the merchant secret.
43
     *
44
     * @return string merchant secret - IPN shared secret which merchant gets by email from Paxum Merchant Services
45
     */
46 6
    public function getSecret()
47
    {
48 6
        return $this->getParameter('secret');
49
    }
50
51
    /**
52
     * Set the merchant secret.
53
     *
54
     * @param string $value merchant secret - IPN shared secret which merchant gets by email from Paxum Merchant Services
55
     * @return self
56
     */
57 14
    public function setSecret($value)
58
    {
59 14
        return $this->setParameter('secret', $value);
60
    }
61
}
62