Completed
Push — master ( ebbdca...b75495 )
by Dmitry
02:52
created

ErrorResponseException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.125

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
ccs 2
cts 4
cp 0.5
rs 9.4285
cc 1
eloc 3
nc 1
nop 4
crap 1.125
1
<?php
2
3
/*
4
 * Tools to use API as ActiveRecord for Yii2
5
 *
6
 * @link      https://github.com/hiqdev/yii2-hiart
7
 * @package   yii2-hiart
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\hiart;
13
14
/**
15
 * Class ErrorResponseException
16
 * Exception.
17
 */
18
class ErrorResponseException extends HiArtException
19
{
20
    /**
21
     * @var array The API response
22
     */
23
    public $response;
24
25 1
    public function __construct($message, array $errorInfo = [], $code = 0, \Exception $previous = null)
26
    {
27
        parent::__construct($message, $errorInfo, $code, $previous);
28 1
        $this->response = $this->errorInfo['response'];
29
    }
30
}
31