| Total Complexity | 5 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 7 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | class TransactionStatusResponse extends AbstractResponse |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | private $statusCode; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * TransactionStatusResponse constructor. |
||
| 20 | * |
||
| 21 | * @param RequestInterface $request |
||
| 22 | * @param mixed $data |
||
| 23 | * @param int $statusCode |
||
| 24 | */ |
||
| 25 | 4 | public function __construct(RequestInterface $request, $data, int $statusCode) |
|
| 26 | { |
||
| 27 | 4 | parent::__construct($request, $data); |
|
| 28 | |||
| 29 | 4 | $this->statusCode = $statusCode; |
|
| 30 | 4 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 2 | public function isSuccessful(): bool |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | 1 | public function isCancelled(): bool |
|
| 44 | { |
||
| 45 | 1 | return isset($this->data['status']) && $this->data['status'] === self::RESPONSE_STATUS_CANCELLED; |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 1 | public function getTransactionReference(): ?string |
|
| 54 | } |
||
| 55 | } |
||
| 56 |