CompletePurchaseRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 8
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 5 1
A sendData() 0 3 1
1
<?php
2
/**
3
 * RoboKassa driver for Omnipay PHP payment library.
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-robokassa
6
 * @package   omnipay-robokassa
7
 * @license   MIT
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\RoboKassa\Message;
12
13
/**
14
 * RoboKassa 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
    public function getData()
24
    {
25
        $this->validate('purse', 'secretKey');
26
27
        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
    public function sendData($data)
38
    {
39
        return $this->response = new CompletePurchaseResponse($this, $data);
40
    }
41
}
42