AbstractRequest   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 1

Test Coverage

Coverage 88.89%

Importance

Changes 0
Metric Value
wmc 10
lcom 3
cbo 1
dl 0
loc 50
ccs 16
cts 18
cp 0.8889
rs 10
c 0
b 0
f 0

9 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
A getEndpoint() 0 4 2
A setDescription() 0 4 1
A getDescriotion() 0 4 1
A setFees() 0 4 1
A getFees() 0 4 1
1
<?php
2
/**
3
 * OKPAY driver for Omnipay PHP payment library.
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-okpay
6
 * @package   omnipay-okpay
7
 * @license   MIT
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\OKPAY\Message;
12
13
use Omnipay\Common\Message\AbstractRequest as OmnipayRequest;
14
15
abstract class AbstractRequest extends OmnipayRequest
16
{
17
    protected $liveEndpoint = 'https://www.okpay.com/process.html';
18
    protected $testEndpoint = 'https://www.okpay.com/process.html';
19
20 7
    public function getPurse()
21
    {
22 7
        return $this->getParameter('purse');
23
    }
24
25 14
    public function setPurse($value)
26
    {
27 14
        return $this->setParameter('purse', $value);
28
    }
29
30 2
    public function getSecret()
31
    {
32 2
        return $this->getParameter('secret');
33
    }
34
35 12
    public function setSecret($value)
36
    {
37 12
        return $this->setParameter('secret', $value);
38
    }
39
40 2
    public function getEndpoint()
41
    {
42 2
        return $this->getTestMode() ? $this->testEndpoint : $this->liveEndpoint;
43
    }
44
45 4
    public function setDescription($value)
46
    {
47 4
        return $this->setParameter('description', $value);
48
    }
49
50
    public function getDescriotion()
51
    {
52
        return $this->getParameter('description');
53
    }
54
55 8
    public function setFees($value)
56
    {
57 8
        return $this->setParameter('fees', $value);
58
    }
59
60 6
    public function getFees()
61
    {
62 6
        return  $this->getParameter('fees');
63
    }
64
}
65