CompletePurchaseRequest::sendData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
/**
3
 * ePayService driver for the Omnipay PHP payment processing library.
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-epayservice
6
 * @package   omnipay-epayservice
7
 * @license   MIT
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\ePayService\Message;
12
13
/**
14
 * ePayService Complete Purchase Request.
15
 */
16
class CompletePurchaseRequest extends AbstractRequest
17
{
18
    /**
19
     * Get the data for this request.
20
     *
21
     * @return array request data
22
     */
23 2
    public function getData()
24
    {
25 2
        $this->validate('purse');
26
27 2
        return $this->httpRequest->request->all();
28
    }
29
30
    /**
31
     * Send the request with specified data.
32
     *
33
     * @param mixed $data The data to send
34
     *
35
     * @return CompletePurchaseResponse
36
     */
37 1
    public function sendData($data)
38
    {
39 1
        return $this->response = new CompletePurchaseResponse($this, $data);
40
    }
41
}
42