Passed
Pull Request — feature/eco-2295/dev (#1)
by Aleksey
02:10 queued 01:12
created

CrefoPayApiGuzzleRequestException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getResponse() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\CrefoPayApi\Dependency\External\Guzzle\Exception;
9
10
use Exception;
11
use SprykerEco\Zed\CrefoPayApi\Dependency\External\Guzzle\Response\CrefoPayApiGuzzleResponseInterface;
12
use Throwable;
13
14
class CrefoPayApiGuzzleRequestException extends Exception
15
{
16
    /**
17
     * @var \SprykerEco\Zed\CrefoPayApi\Dependency\External\Guzzle\Response\CrefoPayApiGuzzleResponseInterface
18
     */
19
    protected $response;
20
21
    /**
22
     * @param \SprykerEco\Zed\CrefoPayApi\Dependency\External\Guzzle\Response\CrefoPayApiGuzzleResponseInterface $response
23
     * @param string $message
24
     * @param int $code
25
     * @param \Throwable|null $previous
26
     */
27
    public function __construct(
28
        CrefoPayApiGuzzleResponseInterface $response,
29
        $message = "",
30
        $code = 0,
31
        ?Throwable $previous = null
32
    ) {
33
        parent::__construct($message, $code, $previous);
34
35
        $this->response = $response;
36
    }
37
38
    /**
39
     * @return \SprykerEco\Zed\CrefoPayApi\Dependency\External\Guzzle\Response\CrefoPayApiGuzzleResponseInterface
40
     */
41
    public function getResponse(): CrefoPayApiGuzzleResponseInterface
42
    {
43
        return $this->response;
44
    }
45
}
46