ApiException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace kop\kue\exceptions;
4
5
/**
6
 * Class `ApiException`
7
 * ====================
8
 *
9
 * This class represents an exception caused by API request made by the user.
10
 *
11
 *
12
 * @link    https://kop.github.io/php-kue-client/ Project page.
13
 * @license https://github.com/kop/php-kue-client/blob/master/LICENSE.md MIT
14
 *
15
 * @author  Ivan Koptiev <[email protected]>
16
 */
17
class ApiException extends Exception
18
{
19
    /**
20
     * @var integer HTTP status code, such as 403, 404, 500, etc.
21
     */
22
    public $statusCode;
23
24
    /**
25
     * Class constructor.
26
     *
27
     * @param integer $status HTTP status code, such as 404, 500, etc.
28
     * @param string $message Error message.
29
     * @param integer $code Error code.
30
     * @param \Exception $previous The previous exception used for the exception chaining.
31
     */
32
    public function __construct($status, $message = null, $code = 0, \Exception $previous = null)
33
    {
34
        $this->statusCode = $status;
35
        parent::__construct($message, $code, $previous);
36
    }
37
}