Response   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 17
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A isSuccessful() 0 4 1
1
<?php
2
3
namespace Omnipay\AllPay\Message;
4
5
use Omnipay\Common\Message\AbstractResponse;
6
use Omnipay\Common\Message\RequestInterface;
7
8
/**
9
 * Response
10
 */
11
class Response extends AbstractResponse
12
{
13 12
    public function __construct(RequestInterface $request, $data)
14
    {
15 12
        $this->request = $request;
16 12
        $this->data = json_decode($data, true);
17 12
    }
18
19
    /**
20
     * @return bool
21
     * @codeCoverageIgnore
22
     */
23
    public function isSuccessful()
24
    {
25
        return isset($this->data['success']);
26
    }
27
}
28