SubscriptionSpecification   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

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