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

RequestException::getBaseException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
}