CompletePurchaseRequest::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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