RefundResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isSuccessful() 0 5 2
A getTransactionReference() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Omnipay\Sofort\Message;
6
7
class RefundResponse extends AbstractResponse
8
{
9
    public function isSuccessful()
10
    {
11
        return isset($this->data->refund->status) &&
12
            false === in_array($this->data->refund->status, array('error'));
13
    }
14
15
    public function getTransactionReference()
16
    {
17
        return (string) $this->data->refund->transaction;
18
    }
19
}
20