TransactionRejectedSpecification   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A isSatisfiedBy() 0 4 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Korobovn\CloudPayments\Message\Strategy\Specification;
6
7
/**
8
 * @see https://developers.cloudpayments.ru/#oplata-po-kriptogramme
9
 */
10
class TransactionRejectedSpecification implements SpecificationInterface
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function isSatisfiedBy(array $response): bool
16
    {
17
        return ! empty($response['Model']['ReasonCode']) &&
18
               (new NotSuccessSpecification)->isSatisfiedBy($response);
19
    }
20
}
21