Completed
Push — master ( 0ef30a...eb3939 )
by Kevin
03:35
created

ClientException::getResponseBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace PCextreme\Cloudstack\Exception;
4
5
use Exception;
6
7
class ClientException extends Exception
8
{
9
    /**
10
     * @var mixed
11
     */
12
    protected $response;
13
14
    /**
15
     * @param  string        $message
16
     * @param  int           $code
17
     * @param  array|string  $response
18
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
19
     */
20
    public function __construct($message, $code, $response)
21
    {
22
        $this->response = $response;
23
24
        parent::__construct($message, $code);
25
    }
26
27
    /**
28
     * Returns the exception's response body.
29
     *
30
     * @return array|string
31
     */
32
    public function getResponseBody()
33
    {
34
        return $this->response;
35
    }
36
}
37