IncomingResponse::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-onepay
4
 *
5
 * @copyright (c) PHP Viet
6
 * @license [MIT](https://opensource.org/licenses/MIT)
7
 */
8
9
namespace Omnipay\OnePay\Message;
10
11
use Omnipay\Common\Message\RequestInterface;
12
13
/**
14
 * @author Vuong Minh <[email protected]>
15
 * @since 1.0.0
16
 */
17
class IncomingResponse extends Response
18
{
19
    use Concerns\ResponseSignatureValidation;
20
21
    /**
22
     * Khởi tạo đối tượng Response.
23
     *
24
     * @param  \Omnipay\Common\Message\RequestInterface  $request
25
     * @param $data
26
     * @throws \Omnipay\Common\Exception\InvalidResponseException
27
     */
28
    public function __construct(RequestInterface $request, $data)
29
    {
30
        parent::__construct($request, $data);
31
32
        if ($this->isSuccessful()) {
33
            $this->validateSignature();
34
        }
35
    }
36
}
37