SignatureResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-vnpay
4
 *
5
 * @copyright (c) PHP Viet
6
 * @license [MIT](https://opensource.org/licenses/MIT)
7
 */
8
9
namespace Omnipay\VNPay\Message;
10
11
use Omnipay\Common\Message\RequestInterface;
12
13
/**
14
 * @author Vuong Minh <[email protected]>
15
 * @since 1.0.0
16
 */
17
class SignatureResponse extends Response
18
{
19
    use Concerns\ResponseSignatureValidation;
20
21
    /**
22
     * {@inheritdoc}
23
     * @throws \Omnipay\Common\Exception\InvalidResponseException
24
     */
25
    public function __construct(RequestInterface $request, $data)
26
    {
27
        parent::__construct($request, $data);
28
29
        if ($this->isSuccessful()) {
30
            $this->validateSignature();
31
        }
32
    }
33
}
34