RequestException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.9332
cc 1
nc 1
nop 4
crap 1
1
<?php
2
3
namespace NotificationChannels\Intercom\Exceptions;
4
5
use GuzzleHttp\Exception\RequestException as BaseRequestException;
6
use Throwable;
7
8
class RequestException extends IntercomException
9
{
10
    /**
11
     * @var BaseRequestException
12
     */
13
    private $baseException;
14
15
    /**
16
     * {@inheritdoc}
17
     */
18 2
    public function __construct(
19
        BaseRequestException $baseException,
20
        string $message = '',
21
        int $code = 0,
22
        ?Throwable $previous = null
23
    ) {
24 2
        $this->baseException = $baseException;
25
26 2
        parent::__construct($message, $code, $previous);
27 2
    }
28
29
    /**
30
     * @return BaseRequestException
31
     */
32 1
    public function getBaseException(): BaseRequestException
33
    {
34 1
        return $this->baseException;
35
    }
36
}
37