ApplePayStartSessionCorrectSpecification   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

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
class ApplePayStartSessionCorrectSpecification implements SpecificationInterface
8
{
9
    /**
10
     * {@inheritDoc}
11
     */
12
    public function isSatisfiedBy(array $response): bool
13
    {
14
        return ! empty($response['Model']['merchantSessionIdentifier']) &&
15
               (new IsSuccessSpecification)->isSatisfiedBy($response) &&
16
               (new NotMessageSpecification)->isSatisfiedBy($response);
17
    }
18
}
19