Passed
Push — master ( f2b4d8...812c38 )
by xu
12:59
created

RequestNotPassedException::getResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the godruoyi/laravel-tencent007-captcha.
5
 *
6
 * (c) Godruoyi <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled.
9
 */
10
11
namespace Godruoyi\Tencent007\Exceptions;
12
13
use Godruoyi\Tencent007\Response;
14
use Symfony\Component\HttpKernel\Exception\HttpException;
15
16
class RequestNotPassedException extends HttpException
17
{
18
    /**
19
     * Result for tencent validate response
20
     *
21
     * @var \Godruoyi\Tencent007\Response
22
     */
23
    protected $result;
24
25
    public function __construct(Response $response)
26
    {
27
        $this->result = $response;
28
29
        parent::__construct(403, 'Tencent 007 validate failure.');
30
    }
31
32
    /**
33
     * Get response
34
     *
35
     * @return \Godruoyi\Tencent007\Response
36
     */
37
    public function getResult()
38
    {
39
        return $this->result;
40
    }
41
}
42