RabbitResponseException::getRabbitResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
namespace pmill\RabbitRabbit\Exceptions;
3
4
class RabbitResponseException extends \Exception
5
{
6
    /**
7
     * @var array
8
     */
9
    protected $rabbitResponse;
10
11
    /**
12
     * RabbitResponseException constructor.
13
     *
14
     * @param array $rabbitResponse
15
     */
16 1
    public function __construct(array $rabbitResponse)
17
    {
18 1
        $this->rabbitResponse = $rabbitResponse;
19 1
        parent::__construct(json_encode($rabbitResponse));
20 1
    }
21
22
    /**
23
     * @return array
24
     */
25
    public function getRabbitResponse(): array
26
    {
27
        return $this->rabbitResponse;
28
    }
29
}
30