CompletePurchaseRequest::sendData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

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