RequestException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

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