ExchangeException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponse() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace garethp\ews\API\Exception;
4
5
use garethp\ews\API;
6
use garethp\ews\API\Message\ResponseMessageType;
7
use Throwable;
8
9
class ExchangeException extends API\Exception
10
{
11
    /**
12
     * @var ResponseMessageType
13
     */
14
    private $response;
15
16
    public function __construct(ResponseMessageType $response, $code = 0, Throwable $previous = null)
17
    {
18
        $this->response = $response;
19
        parent::__construct($response->getMessageText(), $code, $previous);
20
    }
21
22
    /**
23
     * @return ResponseMessageType
24
     */
25
    public function getResponse()
26
    {
27
        return $this->response;
28
    }
29
}
30