Passed
Push — master ( 7c85b2...443a3c )
by Andrey
03:17
created

RequestException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getBaseException() 0 3 1
1
<?php
2
/**
3
 * @link      http://horoshop.ua
4
 * @copyright Copyright (c) 2015-2018 Horoshop TM
5
 * @author    Andrey Telesh <[email protected]>
6
 */
7
8
namespace FtwSoft\NotificationChannels\Intercom\Exceptions;
9
10
use Throwable;
11
use GuzzleHttp\Exception\RequestException as BaseRequestException;
12
13
class RequestException extends IntercomException
14
{
15
16
    /**
17
     * @var BaseRequestException
18
     */
19
    private $baseException;
20
21
    /**
22
     * @inheritDoc
23
     */
24
    public function __construct(
25
        BaseRequestException $baseException,
26
        string $message = "",
27
        int $code = 0,
28
        ?Throwable $previous = null
29
    ) {
30
        $this->baseException = $baseException;
31
32
        parent::__construct($message, $code, $previous);
33
    }
34
35
    /**
36
     * @return BaseRequestException
37
     */
38
    public function getBaseException(): BaseRequestException
39
    {
40
        return $this->baseException;
41
    }
42
43
}