Gateway   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 29
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A purchase() 0 4 1
A completePurchase() 0 4 1
1
<?php
2
/**
3
 * w-vision
4
 *
5
 * LICENSE
6
 *
7
 * This source file is subject to the MIT License
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that are distributed with this source code.
10
 *
11
 * @copyright  Copyright (c) 2016 Woche-Pass AG (http://www.w-vision.ch)
12
 * @license    MIT License
13
 */
14
15
namespace Omnipay\Datatrans;
16
17
/**
18
 * Datatrans Gateway
19
 */
20
class Gateway extends AbstractDatatransGateway
21
{
22 1
    public function getName()
23
    {
24 1
        return 'Datatrans';
25
    }
26
27
    /**
28
     * Start a purchase request
29
     *
30
     * @param array $parameters array of options
31
     * @return \Omnipay\Datatrans\Message\PurchaseRequest
32
     */
33 3
    public function purchase(array $parameters = array())
34
    {
35 3
        return $this->createRequest('\Omnipay\Datatrans\Message\PurchaseRequest', $parameters);
36
    }
37
38
    /**
39
     * Complete a purchase
40
     *
41
     * @param array $parameters
42
     * @return \Omnipay\Datatrans\Message\CompletePurchaseRequest
43
     */
44 5
    public function completePurchase(array $parameters = array())
45
    {
46 5
        return $this->createRequest('\Omnipay\Datatrans\Message\CompletePurchaseRequest', $parameters);
47
    }
48
}
49