Completed
Push — master ( 93f9b0...cd64b3 )
by Claude
03:13
created

AbstractResponse::getLongMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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
 * AbstractResponse.
16
 */
17
abstract class AbstractResponse extends \Omnipay\Common\Message\AbstractResponse
18
{
19 6
    public function isSuccessful()
20
    {
21 6
        return $this->getCode() === '00000';
22
    }
23
24 6
    public function getCode()
25
    {
26 6
        return $this->data->result->code;
27
    }
28
29 6
    public function getMessage()
30
    {
31 6
        return $this->data->result->shortMessage;
32
    }
33
34 6
    public function getLongMessage()
35
    {
36 6
        return $this->data->result->longMessage;
37
    }
38
39 6
    public function getToken()
40
    {
41 6
        return $this->data->token;
42
    }
43
}
44