AbstractSignatureResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 20
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-momo
4
 * @copyright (c) PHP Viet
5
 * @license [MIT](http://www.opensource.org/licenses/MIT)
6
 */
7
8
namespace Omnipay\MoMo\Message;
9
10
use Omnipay\Common\Message\RequestInterface;
11
12
/**
13
 * @author Vuong Minh <[email protected]>
14
 * @since 1.0.0
15
 */
16
abstract class AbstractSignatureResponse extends AbstractResponse
17
{
18
    use Concerns\ResponseSignatureValidation;
19
20
    /**
21
     * Khởi tạo đối tượng Response.
22
     *
23
     * @param  \Omnipay\Common\Message\RequestInterface  $request
24
     * @param $data
25
     * @throws \Omnipay\Common\Exception\InvalidResponseException
26
     */
27
    public function __construct(RequestInterface $request, $data)
28
    {
29
        parent::__construct($request, $data);
30
31
        if ('0' === $this->getCode()) {
32
            $this->validateSignature();
33
        }
34
    }
35
}
36