WebCompleteAuthorizeRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 2
cbo 3
dl 0
loc 29
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 4 1
A getData() 0 8 1
A createResponse() 0 4 1
1
<?php
2
3
/*
4
 * WebMoney driver for the Omnipay PHP payment processing library
5
 *
6
 * @link      https://github.com/ck-developer/omnipay-payline
7
 * @package   omnipay-payline
8
 * @license   MIT
9
 * @copyright Copyright (c) 2016 Claude Khedhiri <[email protected]>
10
 */
11
12
namespace Omnipay\Payline\Message;
13
14
/**
15
 * Authorize Request.
16
 *
17
 * @method WebAuthorizeResponse send()
18
 */
19
class WebCompleteAuthorizeRequest extends AbstractRequest
20
{
21
    /**
22
     * @return bool
23
     */
24 3
    public function getMethod()
25
    {
26 3
        return 'getWebPaymentDetails';
27
    }
28
29 3
    public function getData()
30
    {
31 3
        $data = array();
32
33 3
        $data['token'] = $this->httpRequest->get('token', $this->getToken());
34
35 3
        return $data;
36
    }
37
38
    /**
39
     * @param \stdClass $data
40
     *
41
     * @return WebAuthorizeResponse
42
     */
43 3
    protected function createResponse($data)
44
    {
45 3
        return $this->response = new WebCompleteAuthorizeResponse($this, $data);
46
    }
47
}
48