Passed
Push — main ( 76801a...007e00 )
by Dan
06:22 queued 03:30
created

Gateway::completePurchase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Omnipay\WindcaveHpp;
4
5
use Omnipay\Common\AbstractGateway;
6
use Omnipay\WindcaveHpp\Message\CompletePurchaseRequest;
7
use Omnipay\WindcaveHpp\Message\PurchaseRequest;
8
9
/**
10
 * Windcave HPP Payment Gateway
11
 */
12
class Gateway extends AbstractGateway
13
{
14
    /**
15
     * Get name
16
     *
17
     * @return string
18
     */
19
    public function getName()
20
    {
21
        return 'Windcave HPP';
22
    }
23
24
    /**
25
     * Get default parameters
26
     *
27
     * @return array
28
     */
29
    public function getDefaultParameters()
30
    {
31
        return [];
32
    }
33
34
    /* @todo add other functions */
35
36
    /**
37
     * Purchase
38
     *
39
     * @param array $parameters Parameters
40
     *
41
     * @return Omnipay\WindcaveHpp\Message\PurchaseRequest
0 ignored issues
show
Bug introduced by
The type Omnipay\WindcaveHpp\Omni...Message\PurchaseRequest was not found. Did you mean Omnipay\WindcaveHpp\Message\PurchaseRequest? If so, make sure to prefix the type with \.
Loading history...
42
     */
43
    public function purchase(array $parameters = [])
44
    {
45
        return $this->createRequest(
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->createRequ...st::class, $parameters) returns the type Omnipay\WindcaveHpp\Message\PurchaseRequest which is incompatible with the documented return type Omnipay\WindcaveHpp\Omni...Message\PurchaseRequest.
Loading history...
46
            PurchaseRequest::class,
47
            $parameters
48
        );
49
    }
50
51
    /**
52
     * Complete a purchase process
53
     *
54
     * @param array $parameters
55
     *
56
     * @return Omnipay\WindcaveHpp\Message\CompletePurchaseRequest
0 ignored issues
show
Bug introduced by
The type Omnipay\WindcaveHpp\Omni...CompletePurchaseRequest was not found. Did you mean Omnipay\WindcaveHpp\Mess...CompletePurchaseRequest? If so, make sure to prefix the type with \.
Loading history...
57
     */
58
    public function completePurchase(array $parameters = array())
59
    {
60
        return $this->createRequest(CompletePurchaseRequest::class, $parameters);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->createRequ...st::class, $parameters) returns the type Omnipay\WindcaveHpp\Mess...CompletePurchaseRequest which is incompatible with the documented return type Omnipay\WindcaveHpp\Omni...CompletePurchaseRequest.
Loading history...
61
    }
62
}
63