InvalidRequestSpecification::isSatisfiedBy()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 3
nc 3
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Korobovn\CloudPayments\Message\Strategy\Specification;
6
7
class InvalidRequestSpecification implements SpecificationInterface
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function isSatisfiedBy(array $response): bool
13
    {
14
        return empty($response['Model']) &&
15
               (new NotSuccessSpecification)->isSatisfiedBy($response) &&
16
               (new IsMessageSpecification)->isSatisfiedBy($response);
17
    }
18
}
19