ServerException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 55.56%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 28
ccs 5
cts 9
cp 0.5556
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getRequest() 0 4 1
A getResponse() 0 4 1
1
<?php
2
3
namespace GoetasWebservices\SoapServices\SoapClient\Exception;
4
5
use Psr\Http\Message\RequestInterface;
6
use Psr\Http\Message\ResponseInterface;
7
8
class ServerException extends \Exception
9
{
10
    private $request;
11
    private $response;
12
13 13
    public function __construct(ResponseInterface $response, RequestInterface $request, \Exception $previous = null)
14
    {
15 13
        parent::__construct("Server error", null, $previous);
16 13
        $this->response = $response;
17 13
        $this->request = $request;
18 13
    }
19
20
    /**
21
     * @return RequestInterface
22
     */
23
    public function getRequest()
24
    {
25
        return $this->request;
26
    }
27
28
    /**
29
     * @return ResponseInterface
30
     */
31
    public function getResponse()
32
    {
33
        return $this->response;
34
    }
35
}
36