ResponseException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 37
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setResponse() 0 4 1
A getResponse() 0 4 1
1
<?php
2
namespace VideoPublisher\Connection;
3
4
use Exception;
5
6
7
/**
8
 * Class ResponseException.
9
 *
10
 * @author Bart Malestein <[email protected]>
11
 */
12
class ResponseException extends Exception
13
{
14
15
    /**
16
     * @var ResponseInterface
17
     */
18
    protected $response;
19
20
    /**
21
     * ResponseException constructor.
22
     * @param ResponseInterface $response
23
     * @param null $message
24
     * @param null $code
25
     * @param null $previous
26
     */
27
    public function __construct(ResponseInterface $response, $message = null, $code = null, $previous = null)
28
    {
29
        $this->response = $response;
30
        parent::__construct($message, $code, $previous);
31
    }
32
33
    /**
34
     * @param ResponseInterface $response
35
     */
36
    public function setResponse(ResponseInterface $response)
37
    {
38
        $this->response = $response;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getResponse()
45
    {
46
        return $this->response;
47
    }
48
}
49
50