Completed
Pull Request — master (#3)
by Mads
04:19
created

ApiInternalCallException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 36
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponse() 0 3 1
A __construct() 0 4 1
A getExceptionMessage() 0 3 1
1
<?php
2
3
namespace Napp\Core\Api\Exceptions\Exceptions;
4
5
use Symfony\Component\HttpFoundation\Response;
6
7
class ApiInternalCallException extends \RuntimeException
8
{
9
    /**
10
     * @var Response
11
     */
12
    protected $response;
13
14
    /**
15
     * @var string
16
     */
17
    protected $exceptionMessage;
18
19
    /**
20
     * @param Response $response
21
     * @param string $message
22
     */
23
    public function __construct(Response $response, $message = 'There was an error while processing your request')
24
    {
25
        $this->response = $response;
26
        $this->exceptionMessage = $message;
27
    }
28
29
    /**
30
     * @return Response
31
     */
32
    public function getResponse()
33
    {
34
        return $this->response;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getExceptionMessage()
41
    {
42
        return $this->exceptionMessage;
43
    }
44
}
45