RefundResponse::isSuccessful()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Omnipay\IcepayPayments\Message;
4
5
/**
6
 * The response after telling Icepay to refund a transaction or order.
7
 */
8
class RefundResponse extends AbstractResponse
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 2
    public function isSuccessful(): bool
14
    {
15 2
        return in_array(
16 2
            $this->data['RefundStatusCode'],
17
            [
18 2
                self::RESPONSE_STATUS_COMPLETED,
19 2
                self::RESPONSE_STATUS_REFUND,
20
            ]
21
        );
22
    }
23
}
24