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

ErrorResponseException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 1
c 3
b 0
f 2
lcom 0
cbo 1
dl 0
loc 13
ccs 2
cts 4
cp 0.5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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