UnexpectedApiResponseException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
rs 10
c 0
b 0
f 0
ccs 0
cts 5
cp 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A getResponse() 0 3 1
1
<?php
2
3
namespace LaravelIproSoftwareApi\Exceptions;
4
5
use LaravelIproSoftwareApi\IproApiResponse;
6
7
class UnexpectedApiResponseException extends \Exception
8
{
9
    protected IproApiResponse $response;
10
11
    public function __construct(IproApiResponse $response, $message = null, $previous = null)
12
    {
13
        $this->response = $response;
14
        parent::__construct($message ?: 'Unexpected Ipro api response.', $response->status(), $previous);
15
    }
16
17
    public function getResponse(): IproApiResponse
18
    {
19
        return $this->response;
20
    }
21
}
22