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

RequestNotPassedException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 26
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResult() 0 4 1
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